No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0277.xml 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Microblogging over XMPP</title>
  10. <abstract>This specification defines a method for microblogging over XMPP.</abstract>
  11. &LEGALNOTICE;
  12. <number>0277</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>None</sig>
  16. <approver>Council</approver>
  17. <dependencies/>
  18. <supersedes/>
  19. <supersededby/>
  20. <shortname>microblog</shortname>
  21. &stpeter;
  22. &hildjj;
  23. <author>
  24. <firstname>Sergey</firstname>
  25. <surname>Dobrov</surname>
  26. <email>binary@jrudevels.org</email>
  27. <jid>binary@jrudevels.org</jid>
  28. <uri>http://jrudevels.org/</uri>
  29. </author>
  30. <author>
  31. <firstname>Valerian</firstname>
  32. <surname>Saliou</surname>
  33. <email>valerian@valeriansaliou.name</email>
  34. <jid>valerian@jappix.com</jid>
  35. <uri>https://valeriansaliou.name/</uri>
  36. </author>
  37. <revision>
  38. <version>0.6.2</version>
  39. <date>2017-11-28</date>
  40. <initials>fs (XEP Editor: jwi)</initials>
  41. <remark>Editing</remark>
  42. </revision>
  43. <revision>
  44. <version>0.6.1</version>
  45. <date>2015-12-09</date>
  46. <initials>XEP Editor (mam)</initials>
  47. <remark><p>Updated contact information for Valerian Saliou</p></remark>
  48. </revision>
  49. <revision>
  50. <version>0.6</version>
  51. <date>2012-05-22</date>
  52. <initials>snd</initials>
  53. <remark><p>Added node configuration suggestions; removed file attachments; added rich content examples; change atom:content to atom:title anywhere in the document; invented the "Aggregator" entity; changed nodes metainformation locations; added possibility to add own content to repost.</p></remark>
  54. </revision>
  55. <revision>
  56. <version>0.5</version>
  57. <date>2011-06-15</date>
  58. <initials>vs</initials>
  59. <remark><p>Changed the commenting Pubsub service from PEP to external.</p></remark>
  60. </revision>
  61. <revision>
  62. <version>0.4</version>
  63. <date>2011-06-01</date>
  64. <initials>vs</initials>
  65. <remark><p>Added microblog metadata feature, ID innacurracy fixed, urn:xmpp:inbox support added, new commenting namespaces, first comment marker, security considerations added.</p></remark>
  66. </revision>
  67. <revision>
  68. <version>0.3</version>
  69. <date>2011-04-26</date>
  70. <initials>vs</initials>
  71. <remark><p>Comments link "link[rel=related]" is now "link[rel=replies]" and "title" is now "content[type=text]" or "content[type=xhtml]"; added geolocation feature; added commenting feature on attachments.</p></remark>
  72. </revision>
  73. <revision>
  74. <version>0.2</version>
  75. <date>2011-04-20</date>
  76. <initials>vs</initials>
  77. <remark><p>Added file attachment and commenting features; updated XML namespaces in examples.</p></remark>
  78. </revision>
  79. <revision>
  80. <version>0.1</version>
  81. <date>2010-01-27</date>
  82. <initials>psa</initials>
  83. <remark><p>Initial version as accepted for publication by the XMPP Council.</p></remark>
  84. </revision>
  85. <revision>
  86. <version>0.0.1</version>
  87. <date>2008-05-07</date>
  88. <initials>psa/jh</initials>
  89. <remark><p>First draft.</p></remark>
  90. </revision>
  91. </header>
  92. <section1 topic='Introduction' anchor='intro'>
  93. <p>Microblogging is an increasingly popular technology for lightweight interaction over the Internet. It differs from traditional blogging in that:</p>
  94. <ul>
  95. <li>Posts are short (typically less than 140 characters, which is the limit in SMS).</li>
  96. <li>Posts are in plain text.</li>
  97. <li>People can reply to your posts, but not directly comment on them.</li>
  98. <li>People learn about your posts only if they have permission to view them.</li>
  99. <li>Your microblogging feed is discovered based on your identity at a domain or with a service.</li>
  100. </ul>
  101. <p>These characteristics map well to instant messaging systems such as those built using Jabber/XMPP technologies (e.g., permissions can be based on existing presence subscriptions as reflected in the XMPP roster or "buddy list"). Furthermore, the push nature of XMPP (especially as formalized in the &xep0163; profile of &xep0060;) overcomes the problems of polling for updates via HTTP, which has caused scaling issues in existing microblogging services. Therefore this specification defines a method for microblogging over XMPP, building on the existing method for transporting Atom syndication data &rfc4287; over XMPP as described in &atomsub;. These XMPP-based methods are complementary to HTTP-based methods, and can provide an XMPP interface to existing microblogging services (which may also be accessible via HTTP, Short Message Service (SMS), and other messaging transports).</p>
  102. </section1>
  103. <section1 topic='Protocol' anchor='proto'>
  104. <section2 topic='Location' anchor='location'>
  105. <p>A person's microblog SHOULD be located at a personal eventing (PEP) node whose name is "urn:xmpp:microblog:0" but MAY be located at a generic publish-subscribe node that is not attached to a user's IM account. For instance, if the Shakespearean character Romeo has a JabberID of &lt;romeo@montague.lit&gt; then his microblog would be located at that JID with a node of "urn:xmpp:microblog:0". Outside of native XMPP systems, this node can be referred to as the following XMPP URI (see <cite>XEP-0060 § 12.21</cite>).</p>
  106. <code><![CDATA[
  107. xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
  108. ]]></code>
  109. <p>Note that the ":" character from the namespace URN is percent-encoded in the query component (see &rfc5122; and &rfc3986;).</p>
  110. <p>Naturally, this node can be discovered by contacting romeo@montague.lit directly using &xep0030;.</p>
  111. </section2>
  112. <section2 topic='Subscribing to a Microblog' anchor='subscribe'>
  113. <p>Let us imagine that Juliet wishes to receive the posts that Romeo publishes to his microblog. She has two options:</p>
  114. <ol>
  115. <li>Implicitly subscribe by advertising support for "urn:xmpp:microblog:0+notify" in her &xep0115; data. Romeo's PEP service then automatically sends posts to her when it receives presence from her, until and unless she sends presence of type unavailable or stops advertising an interest in microblog updates.</li>
  116. <li>Explicitly subscribe by sending a formal subscription request to the "urn:xmpp:microblog:0" node at Romeo's JabberID. Romeo's PEP service may send her all posts even if she is offline at the time (depending on service policies regarding presence integration).</li>
  117. </ol>
  118. </section2>
  119. <section2 topic='Publishing a Post' anchor='publish'>
  120. <p>Romeo can publish a post via any interface provided by his service, such as a website, the Atom Publishing Protocol (see &rfc5023;), SMS, an IM bot, or XMPP pubsub. Here we assume that the post is provided via XMPP pubsub.</p>
  121. <p>The post content itself can be either text (content element without "type" attribute or with "type" attribute with "text" value) or XHTML ("content" element "type" attribute with "xhtml" value). If Romeo publishes XHTML content, his client MUST publish two "content" elements: a text one, and a XHTML one. For XHTML publishing, see &xep0060;.</p>
  122. <p>Note: Publishing via HTTP, AtomPub, SMS, or IM bot is simpler for the client (e.g., because the client does not need to generate an Item ID).</p>
  123. <example caption="Publishing a post"><![CDATA[
  124. <iq from='romeo@montague.lit/pda'
  125. id='pub1'
  126. to='romeo@montague.lit'
  127. type='set'>
  128. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  129. <publish node='urn:xmpp:microblog:0'>
  130. <item id='1cb57d9c-1c46-11dd-838c-001143d5d5db'>
  131. <entry xmlns='http://www.w3.org/2005/Atom'>
  132. <title type='text'>hanging out at the Caf&amp;#233; Napolitano</title>
  133. <id>tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id>
  134. <published>2008-05-08T18:30:02Z</published>
  135. <updated>2008-05-08T18:30:02Z</updated>
  136. </entry>
  137. </item>
  138. </publish>
  139. </pubsub>
  140. </iq>
  141. ]]></example>
  142. <p>Note: The "title" element is required to be included in an "atom:entry" element according to &rfc4287;. An implementation MAY provide also "atom:summary" and/or "atom:content" elements too if it needs.</p>
  143. <section3 topic="Publishing a Post with Rich Content" anchor="rich_content">
  144. <p>It's possible to insert some rich content in the post or comment. It can be some text formatting, images, etc. Only "xhtml" content type is supported for the moment by this document but possibly it will be extended later. Also, it is RECOMMENDED for the client to restrict XHTML content to the XHTML-IM subset (&xep0071;).</p>
  145. <example caption="Publishing a post with rich content"><![CDATA[
  146. <iq from='romeo@montague.lit/pda'
  147. id='pub1'
  148. to='romeo@montague.lit'
  149. type='set'>
  150. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  151. <publish node='urn:xmpp:microblog:0'>
  152. <item id='1cb57d9c-1c46-11dd-838c-001143d5d5db'>
  153. <entry xmlns='http://www.w3.org/2005/Atom'>
  154. <title type='xhtml'>
  155. <div xmlns="http://www.w3.org/1999/xhtml">
  156. <p>hanging out at the <strong>Caf&amp;#233; Napolitano</strong></p>
  157. </div>
  158. </title>
  159. <id>tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id>
  160. <published>2008-05-08T18:30:02Z</published>
  161. <updated>2008-05-08T18:30:02Z</updated>
  162. </entry>
  163. </item>
  164. </publish>
  165. </pubsub>
  166. </iq>
  167. ]]></example>
  168. </section3>
  169. </section2>
  170. <section2 topic='Receiving a Post' anchor='receive'>
  171. <p>Because Juliet has sent presence to Romeo including Entity Capabilities data that encapsulates the "urn:xmpp:microblog:0+notify" feature, Romeo's XMPP server will send a PEP notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with Jabber clients that are not pubsub-capable (see <link url="#body">Message Body</link>).</p>
  172. <example caption="Receiving a post"><![CDATA[
  173. <message from='romeo@montague.lit'
  174. to='juliet@capulet.lit'
  175. type='headline'>
  176. <body>hanging out at the Caf&amp;#233; Napolitano</body>
  177. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  178. <items node='urn:xmpp:microblog:0'>
  179. <item id='1cb57d9c-1c46-11dd-838c-001143d5d5db' publisher='romeo@montague.lit'>
  180. <entry xmlns='http://www.w3.org/2005/Atom'>
  181. <title type='text'>hanging out at the Caf&amp;#233; Napolitano</title>
  182. <link rel='alternate'
  183. type='text/html'
  184. href='http://montague.lit/romeo/posts/1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
  185. <link rel='alternate'
  186. href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
  187. <id>tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id>
  188. <published>2008-05-08T18:30:02Z</published>
  189. <updated>2008-05-08T18:30:02Z</updated>
  190. </entry>
  191. </item>
  192. </items>
  193. </event>
  194. </message>
  195. ]]></example>
  196. <p>Note: these alternate links were not posted by client because client can't compute them itself. These things SHOULD be inserted at server side though.</p>
  197. </section2>
  198. <section2 topic='Replying to a Post' anchor='reply'>
  199. <p>Anyone can publish a post in reply to Romeo's post. Here we assume that a reply comes from Benvolio.</p>
  200. <p>Note: Inclusion of the "thr:in-reply-to" element defined in &rfc4685; indicates the post to which the user is replying. This reply includes two such elements (one pointing to the HTTP URL for the post and the other pointing to the XMPP URI for the post.</p>
  201. <p>Note: The post can be a reply to more than the only one another.</p>
  202. <example caption="Publishing a reply"><![CDATA[
  203. <iq from='benvolio@montague.lit/mobile'
  204. id='uv2x37s5'
  205. to='benvolio@montague.lit'
  206. type='set'>
  207. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  208. <publish node='urn:xmpp:microblog:0'>
  209. <item id='c4145006-1c53-11dd-b2d5-000bcd82471e'>
  210. <entry xmlns='http://www.w3.org/2005/Atom'
  211. xmlns:thr='http://purl.org/syndication/thread/1.0'>
  212. <author>
  213. <name>Benvolio Montague</name>
  214. <uri>xmpp:romeo@montague.lit</uri>
  215. </author>
  216. <title type='text'>@romeo cappuccino this late in the day?</title>
  217. <link rel='alternate'
  218. type='text/html'
  219. href='http://montague.lit/benvolio/posts/c4145006-1c53-11dd-b2d5-000bcd82471e'/>
  220. <link rel='alternate'
  221. href='xmpp:benvolio@montague.lit?;
  222. node=urn%3Axmpp%3Amicroblog%3A0;
  223. item=c4145006-1c53-11dd-b2d5-000bcd82471e'/>
  224. <id>tag:montague.lit,2008-05-08:posts-c4145006-1c53-11dd-b2d5-000bcd82471e</id>
  225. <published>2008-05-08T18:31:21Z</published>
  226. <updated>2008-05-08T18:31:21Z</updated>
  227. <thr:in-reply-to
  228. ref='tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db'
  229. type='application/xhtml+xml'
  230. href='http://montague.lit/romeo/posts/1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
  231. <thr:in-reply-to
  232. ref='tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db'
  233. href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
  234. </entry>
  235. </item>
  236. </publish>
  237. </pubsub>
  238. </iq>
  239. ]]></example>
  240. <p>Assuming that Romeo has also shared presence with Benvolio and has advertised support for "urn:xmpp:microblog:0+notify", he will receive the reply that Benvolio sent.</p>
  241. </section2>
  242. <section2 topic='Repeating a Post' anchor='repeat'>
  243. <p>When Benvolio wants to repeat a Romeo's post, his client publishes the same post under a different name. But to be able to track the repeated post original author, Benvolio's client MAY use specific "atom:author" child node, "atom:name" and "atom:uri", containing, respectively, the name of the original post author, and his XMPP URI (JID).</p>
  244. <p>If a comments link is present (see the <link url='#post_comments'>Post Comments</link> section of this document), the client SHOULD repeat it to keep the same discussion about the post. The client also MAY create a separate node to discuss and specify it or specify both.</p>
  245. <p>The client SHOULD also put an "atom:link" element with "rel" attribute set to "via" and point it to the original post.</p>
  246. <example caption="Repeating a Post"><![CDATA[
  247. <iq from='benvolio@montague.lit/mobile'
  248. id='pub2'
  249. to='benvolio@montague.lit'
  250. type='set'>
  251. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  252. <publish node='urn:xmpp:microblog:0'>
  253. <item id='1re57d3c-1q46-11dd-748r-024943d2d5rt'>
  254. <entry xmlns='http://www.w3.org/2005/Atom'>
  255. <author>
  256. <name>Romeo Montague</name>
  257. <uri>xmpp:romeo@montague.lit</uri>
  258. </author>
  259. <title type='text'>hanging out at the Caf&amp;#233; Napolitano</title>
  260. <link rel='alternate'
  261. type='text/html'
  262. href='http://montague.lit/benvolio/posts/1re57d3c-1q46-11dd-748r-024943d2d5rt'/>
  263. <link rel='alternate'
  264. href='xmpp:benvolio@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=1re57d3c-1q46-11dd-748r-024943d2d5rt'/>
  265. <link rel='via'
  266. href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=1cb57d9c-1c46-11dd-838c-001143d5d5db'
  267. ref='tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
  268. <id>tag:montague.lit,2008-05-08:posts-1re57d3c-1q46-11dd-748r-024943d2d5rt</id>
  269. <published>2008-05-08T18:30:02Z</published>
  270. <updated>2008-05-08T18:32:02Z</updated>
  271. </entry>
  272. </item>
  273. </publish>
  274. </pubsub>
  275. </iq>
  276. ]]></example>
  277. <p>Thus, a different author JID value lets the client know the microblog item has been repeated from another one.</p>
  278. <p>It's also possible for Benvolio to add his own thougths to the repost. To do this he SHOULD wrap the original content in the "xhtml:blockquote" element and after it add his own content. Also, the client MAY post reply without quotation to the original thread to inform users about the repost.</p>
  279. </section2>
  280. <section2 topic="Post Categories" anchor="categories">
  281. <p>It's often handy to specify categories (or tags) to a post to make it easier to find it or to structure a blog. It's possible by adding "atom:category" element to the entry (it can be blog or replies entry).</p>
  282. <example caption="Specify post's categories"><![CDATA[
  283. <entry xmlns='http://www.w3.org/2005/Atom'>
  284. ...
  285. <category term='humour'/>
  286. <category term='xmpp'/>
  287. ...
  288. </entry>
  289. ]]></example>
  290. </section2>
  291. </section1>
  292. <section1 topic='Comments' anchor='comments'>
  293. <p>Juliet and Benvolio may want to discuss about latest Romeo's post. To enable this, Romeo's client MAY add a "atom:link" element to the PubSub item. The element MUST have "rel", "title" and "href" attributes, where "rel" MUST have the "replies" value; "title" MUST have the "comments" value; "href" MUST be an XMPP URI (see &rfc5122; and &rfc3986;).</p>
  294. <section2 topic='Post Comments' anchor='post_comments'>
  295. <p>We assume Romeo's client first created a comments node (named "urn:xmpp:microblog:0:comments/ID", where "ID" is the microblog item ID, or the SHA-1 encoded attachment URI, as defined in &rfc3174;).</p>
  296. <example caption="Adding a comments link to a Post"><![CDATA[
  297. <iq from='romeo@montague.lit/pda'
  298. id='pub4'
  299. to='romeo@montague.lit'
  300. type='set'>
  301. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  302. <publish node='urn:xmpp:microblog:0'>
  303. <item id='2ze57d9c-1c46-21df-830c-002143d3d2qgf'>
  304. <entry xmlns='http://www.w3.org/2005/Atom'>
  305. <title type='text'>hanging out at the Caf&amp;#233; Napolitano</title>
  306. <link rel='replies'
  307. title='comments'
  308. href='xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Fdd88c9bc58886fce0049ed050df0c5f2'/>
  309. <id>tag:montague.lit,2008-05-08:posts-2ze57d9c-1c46-21df-830c-002143d3d2qgf</id>
  310. <published>2008-05-08T18:38:02Z</published>
  311. <updated>2008-05-08T18:38:02Z</updated>
  312. </entry>
  313. </item>
  314. </publish>
  315. </pubsub>
  316. </iq>
  317. ]]></example>
  318. </section2>
  319. <section2 topic='Adding a Comment' anchor='comment_add'>
  320. <p>If Juliet wants to comment Romeo's latest post, her client sends a new Atom entry to the defined PubSub node.</p>
  321. <p>Note: A comments node SHOULD be located at a generic publish-subscribe node that is not attached to a user's IM account, but MAY be located at a personal eventing (PEP) node.</p>
  322. <example caption="Adding a comment to a comments node"><![CDATA[
  323. <iq from='juliet@capulet.lit/pc'
  324. id='comment1'
  325. to='pubsub.capulet.lit'
  326. type='set'>
  327. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  328. <publish node='urn:xmpp:microblog:0:comments/dd88c9bc58886fce0049ed050df0c5f2'>
  329. <item id='b2106a80de39ef5ec6b8f7b69cb610c2'>
  330. <entry xmlns='http://www.w3.org/2005/Atom'>
  331. <author>
  332. <name>Juliet Capulet</name>
  333. <uri>xmpp:juliet@capulet.lit</uri>
  334. </author>
  335. <title type='text'>She is so pretty!</title>
  336. <published>2008-05-08T18:39:02Z</published>
  337. </entry>
  338. </item>
  339. </publish>
  340. </pubsub>
  341. </iq>
  342. ]]></example>
  343. <p>If Benvolio wants to retrieve the comments node, his client will send a standard PubSub stanza to request all items (see &xep0060; for all items retrieving).</p>
  344. </section2>
  345. </section1>
  346. <section1 topic="Pubsub Node Configuration" anchor="node_config">
  347. <p>We have described two pubsub nodes types here: the one is for the microblog itself and the other one is for comments to posts.</p>
  348. <p>Usage specific requires the special parameters to these nodes to be specified. This section describes recommendation for them.</p>
  349. <section2 topic="Microblog node configuration" anchor="microblog_node_config">
  350. <p>Here are recommendations for a microblogging node (usually located at PEP and named by the "urn:xmpp:microblog:0" namespace) configuration:</p>
  351. <ol>
  352. <li>The "pubsub#notify_retract" MUST be set to true to provide clients the ability to track if some items were retracted and reflect such changes in the UI correctly.</li>
  353. <li>The "pubsub#max_items" SHOULD be increased from the default value to some reasonable value.</li>
  354. <li>The "pubsub#send_last_published_item" SHOULD be changed to "never".</li>
  355. </ol>
  356. </section2>
  357. <section2 topic="Comments node configuration" anchor="comments_node_config">
  358. <p>Here are recommendations for a comments node configuration:</p>
  359. <ol>
  360. <li>The "pubsub#notify_retract" MUST be set to true to provide clients the ability to track if some items were retracted and reflect such changes in the UI correctly.</li>
  361. <li>The "pubsub#max_items" SHOULD be increased from the default value to some reasonable value.</li>
  362. <li>The "pubsub#access_model" SHOULD be set to "open" to allow any user to comment to a post. Other values are suitable too according to the user's settings.</li>
  363. </ol>
  364. </section2>
  365. </section1>
  366. <section1 topic='Microblog Metadata' anchor='metadata'>
  367. <p>In order to provide users with some metadata (i.e. blog title or author information) about the microblog, the client MUST to add an item with such information. The client MUST set the ID of the item to "0".</p>
  368. <example caption="Publishing microblog metadata"><![CDATA[
  369. <iq from='romeo@montague.lit/pc'
  370. id='pub8'
  371. to='romeo@montague.lit'
  372. type='set'>
  373. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  374. <publish node='urn:xmpp:microblog:0'>
  375. <item id='0'>
  376. <feed xmlns='http://www.w3.org/2005/Atom'>
  377. <title>Romeo&amp;apos;s Microblog</title>
  378. <id>tag:montague.lit,2008:home</id>
  379. <updated>2008-05-08T18:30:02Z</updated>
  380. <author>
  381. <name>Romeo Montague</name>
  382. <uri>xmpp:romeo@montague.lit</uri>
  383. </author>
  384. </feed>
  385. </item>
  386. </publish>
  387. </pubsub>
  388. </iq>
  389. ]]></example>
  390. <p>It also necessary to link a comments node to the post which discussed in the node. We will do it by adding the "atom:link" element with "rel=start" attribute:</p>
  391. <example caption="Publishing comments node metadata"><![CDATA[
  392. <iq from='romeo@montague.lit/pc'
  393. id='pub8'
  394. to='pubsub.montague.lit'
  395. type='set'>
  396. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  397. <publish node='urn:xmpp:microblog:0'>
  398. <item id='0'>
  399. <feed xmlns='http://www.w3.org/2005/Atom'>
  400. <title>Comments to a post</title>
  401. <id>tag:pubsub.montague.lit,2008:comments-2ze57d9c-1c46-21df-830c-002143d3d2qgf</id>
  402. <updated>2008-05-08T18:30:02Z</updated>
  403. <link rel='start'
  404. href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=1cb57d9c-1c46-11dd-838c-001143d5d5db'
  405. ref='tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db'/>
  406. </feed>
  407. </item>
  408. </publish>
  409. </pubsub>
  410. </iq>
  411. ]]></example>
  412. </section1>
  413. <section1 topic='Geotagging' anchor='geotagging'>
  414. <p>Juliet may want to know which places are Romeo's notices related to. That's why Romeo's client MAY geotag microblog entries, using the &xep0080; protocol for storing geolocation information.</p>
  415. <p>Romeo's client MUST create a "geoloc" element, with the &xep0080; reference namespace: "http://jabber.org/protocol/geoloc".</p>
  416. <example caption="Geotagging a Post"><![CDATA[
  417. <iq from='romeo@montague.lit/mobile'
  418. id='pub7'
  419. to='romeo@montague.lit'
  420. type='set'>
  421. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  422. <publish node='urn:xmpp:microblog:0'>
  423. <item id='1zr23z8a-3g12-34fh-750b-120867gjc1sqh'>
  424. <entry xmlns='http://www.w3.org/2005/Atom'>
  425. <author>
  426. <name>Romeo Montague</name>
  427. <uri>xmpp:romeo@montague.lit</uri>
  428. </author>
  429. <title type='text'>Is lost in the forest. Need help!</title>
  430. <link rel='replies'
  431. title='comments'
  432. href='xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2F36ec6dfe61e52b1e2cdb248823520233'/>
  433. <id>tag:montague.lit,2008-05-08:posts-1zr23z8a-3g12-34fh-750b-120867gjc1sqh</id>
  434. <published>2008-05-08T18:43:01Z</published>
  435. <updated>2008-05-08T18:43:01Z</updated>
  436. <geoloc xmlns="http://jabber.org/protocol/geoloc">
  437. <lat>48.171761</lat>
  438. <lon>-3.3667986</lon>
  439. <country>France</country>
  440. <countrycode>FR</countrycode>
  441. <region>Brittany</region>
  442. </geoloc>
  443. </entry>
  444. </item>
  445. </publish>
  446. </pubsub>
  447. </iq>
  448. ]]></example>
  449. </section1>
  450. <section1 topic="Aggregators" anchor="aggregators">
  451. <p>In order to provide some statistical information, to represent the blogs other ways than XMPP (i.e. in web or NNTP), we will need other entities called "Aggregators".</p>
  452. <p>You can think of aggregators like about search engines in the web: they gather information from the whole web and then represent it suitable ways. The same is true here: Aggregators just subscibe to many entities and then they can build a database to make queries and show appropriate information according to these queries. Also they can be used to represent information in web or other networks.</p>
  453. <p>Unlike web search engines, an XMPP aggregator does not need to gather information by downloading it frequently to check if something was changed. Instead, it can listen to pubsub events and make its database up-to-date based on this information.</p>
  454. <p>Aggregators can be started by different people with different aims. It can be aggregator which devoted to the concrete blog service provider which will be subscribed only to its own users, or it can be a global search engine which tries to subscribe to most of users or to aggregate the feeds of other aggregators.</p>
  455. <p>This section will describe most used aggregator usecases but the list is not exhaustive.</p>
  456. <section2 topic="Pubsub Item ID vs. Atom Entry id" anchor="pubsub_id_vs_atom_id">
  457. <p>There are two different things that carry a similar sense: the XMPP pubsub Item ID and the "atom:id" element. This section is devoted to make a separation between them.</p>
  458. <p>The pubsub Item ID MUST be used when linking to an entry with an XMPP channel (i.e. by including it in the URI with the "xmpp" schema). the Atom entry ID MUST be built according to &rfc4287; and used in aggregators with the aim of revealing of post duplicates, reposts, mentions, syndications, etc.</p>
  459. <p>Note that the rules of comparing, building and security notes for "atom:id" are listed in the &rfc4287;.</p>
  460. </section2>
  461. <section2 topic="Aggregator Usecases" anchor="aggregator_usecases">
  462. <section3 topic="Representing Posts in the Web" anchor="aggregator_web">
  463. <p>One of the possible aims of aggregator services is to provide web representaion of blogs.</p>
  464. <p>TBD: insert alternate link to the post with the http address of the post.</p>
  465. </section3>
  466. </section2>
  467. </section1>
  468. <section1 topic='Message Body' anchor='body'>
  469. <p>Depending on service policies and the value of the "pubsub#include_body" node configuration option, microblogging notifications SHOULD include a message "body" element for backwards-compatibility with Jabber clients that are not pubsub-capable. It is RECOMMENDED for the XML character value of the "body" element to be the same as that of the "atom:title" child of the "atom:entry".</p>
  470. </section1>
  471. <section1 topic='Security Considerations' anchor='security'>
  472. <section2 topic='Comment Author' anchor='comment_author'>
  473. <p>The client SHOULD check that the comment author information (provided in the "author" element) is valid, by checking that the "publisher" item attribute value matches the "uri" element value. If there is a difference or the check can not be performed because there was not a "publisher" attribute included, the comment can be displayed, but it is RECOMMENDED to specify there is a security problem.</p>
  474. </section2>
  475. </section1>
  476. <section1 topic='IANA Considerations' anchor='iana'>
  477. <p>This document requires no interaction with &IANA;.</p>
  478. </section1>
  479. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  480. <p>The &REGISTRAR; is requested to issue an initial namespace of "urn:xmpp:microblog:0".</p>
  481. </section1>
  482. <section1 topic='XML Schema' anchor='schema'>
  483. <p>This specification re-uses the schema for the Atom content format, i.e., the 'http://www.w3.org/2005/Atom' namespace (see <cite>RFC 4287</cite>).</p>
  484. </section1>
  485. <section1 topic='Acknowledgements' anchor='ack'>
  486. <p>Thanks to Ralph Meijer and Paul Scott for their suggestions.</p>
  487. </section1>
  488. </xep>