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-0402.xml 11KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY namespace "urn:xmpp:bookmarks:0">
  4. <!ENTITY % ents SYSTEM 'xep.ent'>
  5. %ents;
  6. ]>
  7. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  8. <xep>
  9. <header>
  10. <title>Bookmarks 2 (This Time it's Serious)</title>
  11. <abstract>This specification defines a syntax and storage profile for keeping a list of chatroom bookmarks on the server.</abstract>
  13. <number>0402</number>
  14. <status>Experimental</status>
  15. <type>Standards Track</type>
  16. <sig>Standards</sig>
  17. <approver>Council</approver>
  18. <dependencies/>
  19. <supersedes/>
  20. <supersededby/>
  21. <shortname>bookmarks2</shortname>
  22. <registry/>
  23. <discuss>standards</discuss>
  24. <author>
  25. <firstname>Dave</firstname>
  26. <surname>Cridland</surname>
  27. <email></email>
  28. <jid></jid>
  29. </author>
  30. <author>
  31. <firstname>Jan-Carel</firstname>
  32. <surname>Brand</surname>
  33. <email></email>
  34. <jid></jid>
  35. </author>
  36. <revision>
  37. <version>0.2.0</version>
  38. <date>2018-03-28</date>
  39. <initials>jcb</initials>
  40. <remark>Remove password element, add examples, update security considerations.</remark>
  41. </revision>
  42. <revision>
  43. <version>0.1.0</version>
  44. <date>2018-03-28</date>
  45. <initials>XEP Editor (jwi)</initials>
  46. <remark>Accepted by vote of Council on 2018-03-21.</remark>
  47. </revision>
  48. <revision>
  49. <version>0.0.1</version>
  50. <date>2018-03-17</date>
  51. <initials>dwd/jcb</initials>
  52. <remark><p>First draft</p></remark>
  53. </revision>
  54. </header>
  55. <section1 topic='Introduction' anchor='intro'>
  56. <p>The original Bookmarks specification (&xep0048;) used the widely available
  57. Private XML Storage (&xep0049;), but stored all bookmarks in a single element.
  58. When the specification was moved to the Standards Track and Draft, it was also
  59. updated to use the user's Pubsub service (&xep0223;), but kept this single element
  60. containing all bookmarks inside a single Pubsub item.</p>
  61. <p>Most implementations have kept to the original, Private XML Storage based solution, and
  62. while some newer implementations have used Pubsub, these are limited in capability by the use of
  63. a single item.</p>
  64. <p>This specification resolves both issues by providing a new Bookmarks specification to migrate to,
  65. and takes the opportunity to update the XML namespace in use as well. The URL storage is dropped,
  66. since it is rarely used. Storage of URL bookmarks is therefore out of scope.</p>
  67. </section1>
  68. <section1 topic="Outline of use">
  69. <p>Clients store each bookmarked chatroom as a Pubsub item within the '&namespace;' node. Each
  70. item SHALL have, as item id, the Room JID of the chatroom (eg, coven@chat.shakespeare.lit).</p>
  71. <p>The payload of the item SHALL be a conference element qualified by the '&namespace;' namespace, with the following syntax:</p>
  72. <table caption='Syntax of conference element'>
  73. <tr>
  74. <th>Element or Attribute</th>
  75. <th>Definition</th>
  76. <th>Datatype</th>
  77. <th>Inclusion</th>
  78. </tr>
  79. <tr>
  80. <td>'autojoin' attribute</td>
  81. <td>Whether the client should automatically join the conference room on login.</td>
  82. <td>boolean defaulting to false &BOOLEANNOTE;</td>
  83. <td>OPTIONAL</td>
  84. </tr>
  85. <tr>
  86. <td>'name' attribute</td>
  87. <td>A friendly name for the bookmark.</td>
  88. <td>string</td>
  89. <td>RECOMMENDED</td>
  90. </tr>
  91. <tr>
  92. <td>&lt;nick/&gt; element</td>
  93. <td>The user's preferred roomnick for the chatroom.</td>
  94. <td>string</td>
  95. <td>OPTIONAL</td>
  96. </tr>
  97. </table>
  98. <p>Note: The datatypes are as defined in &w3xmlschema2;.</p>
  99. <example caption='An example of the conference element'><![CDATA[
  100. <conference xmlns=']]>&namespace;<![CDATA['
  101. name='Council of Oberon'
  102. autojoin='true'>
  103. <nick>Puck</nick>
  104. </conference>
  105. ]]></example>
  106. <p>This bookmark would be displayed as 'Council of Oberon' and, if activated, would attempt to join the conference room '' with nickname 'Puck'.</p>
  107. <p>Note that a bookmark item MUST contain only one conference room.</p>
  108. <p>Note also that a conference element has no truly mandatory attributes or child elements, though a name SHOULD be given. Thus the following is legal:</p>
  109. <example caption='Minimalist conference element'><![CDATA[
  110. <conference xmlns=']]>&namespace;<![CDATA['/>
  111. ]]></example>
  112. </section1>
  113. <section1 topic='Examples' anchor='examples'>
  114. <section2 topic='Retrieving all bookmarks' anchor='retrieving-bookmarks'>
  115. <example caption='Client retrieves all bookmarks'><![CDATA[
  116. <iq from='juliet@capulet.lit/balcony' type='get' id='retrieve1'>
  117. <pubsub xmlns=''>
  118. <items node='urn:xmpp:bookmarks:0'/>
  119. </pubsub>
  120. </iq>
  121. ]]></example>
  122. <example caption='Server returns the bookmarks'><![CDATA[
  123. <iq type='result'
  124. to='juliet@capulet.lit/balcony'
  125. id='retrieve1'>
  126. <pubsub xmlns=''>
  127. <items node='urn:xmpp:bookmarks:0'>
  128. <item id='theplay@conference.shakespeare.lit'>
  129. <conference name='The Play&apos;s the Thing'
  130. autojoin='true'>
  131. <nick>JC</nick>
  132. </conference>
  133. </item>
  134. <item id='orchard@conference.shakespeare.lit'>
  135. <conference name='The Orchard'
  136. autojoin='true'>
  137. <nick>JC</nick>
  138. </conference>
  139. </item>
  140. </items>
  141. </pubsub>
  142. </iq>
  143. ]]></example>
  144. </section2>
  145. <section2 topic='Adding a bookmark' anchor='adding-a-bookmark'>
  146. <p>Adding a bookmark means publishing a new item, with the bookmark JID as id, to the '&namespace;' node.</p>
  147. <example caption='Client adds a new bookmark'><![CDATA[
  148. <iq from='juliet@capulet.lit/balcony' type='set' id='pip1'>
  149. <pubsub xmlns=''>
  150. <publish node='urn:xmpp:bookmarks:0'>
  151. <item id='theplay@conference.shakespeare.lit'>
  152. <conference name='The Play&apos;s the Thing'
  153. autojoin='true'>
  154. <nick>JC</nick>
  155. </conference>
  156. </item>
  157. </publish>
  158. <publish-options>
  159. <x xmlns='jabber:x:data' type='submit'>
  160. <field var='FORM_TYPE' type='hidden'>
  161. <value></value>
  162. </field>
  163. <field var='pubsub#persist_items'>
  164. <value>true</value>
  165. </field>
  166. <field var='pubsub#access_model'>
  167. <value>whitelist</value>
  168. </field>
  169. </x>
  170. </publish-options>
  171. </pubsub>
  172. </iq>
  173. ]]></example>
  174. <example caption='Server acknowledges successful storage'><![CDATA[
  175. <iq to='juliet@capulet.lit/balcony' type='result' id='pip1'/>
  176. ]]></example>
  177. </section2>
  178. <section2 topic='Removing a bookmark' anchor='removing-a-bookmark'>
  179. <p>Removing a bookmark means retracting an existing item, identified by the bookmark's JID, form the '&namespace;' node.</p>
  180. <p>This implies that server support for the "delete-items" pubsub feature is REQUIRED.</p>
  181. <example caption='Client removes a new bookmark'><![CDATA[
  182. <iq from='juliet@capulet.lit/balcony' type='set' id='remove-bookmark1'>
  183. <pubsub xmlns=''>
  184. <retract node='urn:xmpp:bookmarks:0'>
  185. <item id='theplay@conference.shakespeare.lit'/>
  186. </retract>
  187. </pubsub>
  188. </iq>
  189. ]]></example>
  190. <example caption='Server acknowledges successful retraction'><![CDATA[
  191. <iq to='juliet@capulet.lit/balcony' type='result' id='remove-bookmark1'/>
  192. ]]></example>
  193. </section2>
  194. </section1>
  195. <section1 topic="Bookmark Notifications">
  196. <p>When a client is sent an event from the Pubsub service for the '&namespace;' node, it MUST check the 'autojoin' attribute if present, and join the room immediately if the attribute is both present and true.</p>
  197. </section1>
  198. <section1 topic="Implementation Notes">
  199. <section2 topic="Differences to XEP-0048">
  200. <ul>
  201. <li>The conference element does not contain the jid - this is present only in the item id.</li>
  202. <li>Each conference element is contained within an item.</li>
  203. <li>The storage MUST be &xep0223;</li>
  204. </ul>
  205. </section2>
  206. <section2 topic='Storage' anchor='storage'>
  207. <p>&xep0060; is used for data storage, specifically through the use of private, personal pubsub nodes (described in &xep0223;) hosted at the user's virtual pubsub service (see &xep0163;).</p>
  208. </section2>
  209. <section2 topic="Compatibility">
  210. <p>A server MAY choose to unify the bookmarks from both &xep0049; based and the current &xep0048;.</p>
  211. <section3 topic="Publishing via this specification">
  212. <p>When a client publishes a new item, the server MAY collate all items, casting them into the 'storage:bookmarks' namespace and setting the jid attribute to the item id in each case. When contained within a storage element qualified by the 'storage:bookmarks' namespace, this will be the correct format for both current and previous variants of &xep0048;</p>
  213. </section3>
  214. <section3 topic="Publishing via the old specification">
  215. <p>If a client publishes a replacement list of bookmarks via the older specifications, a server MAY examine the list and update the individual items as required, sending updates or retraction notifications as needed. Servers electing to perform this OPTIONAL behaviour SHOULD NOT send notifications for unchanged items.</p>
  216. </section3>
  217. </section2>
  218. </section1>
  219. <section1 topic='Determining Support' anchor='support'>
  220. <p>This specification relies fully on a number of others. Most particularly, support for this protocol is available if &xep0223; is supported.</p>
  221. </section1>
  222. <section1 topic="Acknowledgements">
  223. <p>The authors would like to note that much of the syntax description was copied exactly from &xep0048; by Rachel Blackman, Peter Millard, and Peter Saint-Andre. Much of the remainder of this specification is based closely on their work.</p>
  224. </section1>
  225. <section1 topic='Security Considerations' anchor='security'>
  226. <p>Security considerations related to object persistence via publish-subscribe are described in <cite>XEP-0060</cite> and <cite>XEP-0223</cite>.</p>
  227. <p>The client needs to make sure that the server actually supports the "" feature, before relying on it. If it's not supported, the client should configure the '&namespace;' node first (see <cite>xep-0060</cite>), before adding any bookmarks.</p>
  228. </section1>
  229. </xep>