Hi everyone,

I'd like to make a few changes on the XEP-0048. With the recent implementation of the Pubsub features in my client I noticed that there are no way to save and centralize the subscribed Pubsub nodes on the XMPP server.

My proposal is quite simple. Take the "subscription" tag used in the XEP-0330 (http://xmpp.org/extensions/xep-0330.html) to store the informations of the subscribed node and put them in Bookmark items.

Furthermore it would be great to add some tags on the Bookmark items to organize and filter them.

All theses changes can be found in the enclosed XEP-0048 patch.

Regards,

Jaussoin Timothée
--- xep-0048.xml	2013-12-01 15:24:15.000000000 +0100
+++ Desktop/xep-0048.xml	2014-02-11 12:21:56.967054813 +0100
@@ -30,6 +30,12 @@
     <email>[email protected]</email>
     <jid>[email protected]</jid>
   </author>
+  <author>
+    <firstname>Timothée</firstname>
+    <surname>Jaussoin</surname>
+    <email>[email protected]</email>
+    <jid>[email protected]</jid>
+  </author>
   &pgmillard;
   &stpeter;
   <revision>
@@ -69,8 +75,38 @@
 </section1>
 
 <section1 topic='Data Format' anchor='format'>
-  <p>A storage element qualified by the 'storage:bookmarks' namespace may contain a collection of child elements, each representing a bookmark to be displayed in a client.  At present, only two sub-elements are defined: &lt;conference/&gt; for bookmarking of &xep0045; rooms and &lt;url/&gt; for bookmarking of web pages.</p>
+  <p>A storage element qualified by the 'storage:bookmarks' namespace may contain a collection of child elements, each representing a bookmark to be displayed in a client.  At present, only tree sub-elements are defined: &lt;conference/&gt; for bookmarking of &xep0045; rooms, &lt;url/&gt; for bookmarking &xep0060; nodes and &lt;url/&gt; for bookmarking of web pages.</p>
   <p>All child elements allow a 'name' attribute, which is the friendly name by which they will be displayed in the client.  If an element lacks a 'name' attribute, the client SHOULD generate an appropriate substitution based on the other available data.</p>
+  
+  <section2 topic='Tagging elements' anchor='format-tags'>
+  <p>To manage more easily the differents Bookmarks elements you MAY add tags to them. Tags are defined using the &lt;tag/&gt; element.</p>
+  
+    <example caption='An example of the tag element'><![CDATA[
+    <storage xmlns='storage:bookmarks'>
+      <conference name='Council of Oberon' 
+                  autojoin='true'
+                  jid='[email protected]'>
+        <nick>Puck</nick>
+        <tag>Council</tag>
+        <tag>Family</tag>
+      </conference>
+      <url name='Complete Works of Shakespeare'
+           url='http://the-tech.mit.edu/Shakespeare/'>
+        <tag>Books</tag>
+        <tag>English</tag>
+        <tag>Litterature</tag>
+      </url>
+      <subscription xmlns="urn:xmpp:pubsub:subscription:0" name="My family party"
+            server="pubsub.shakespeare.lit" node="party">
+          <title>Party at the Capulets</title>
+          <tag>Party</tag>
+          <tag>Important</tag>
+      </subscription>
+    </storage>
+    ]]></example>
+
+  <p>Note : you can add several tags per Bookmark elements.</p>
+  
   <section2 topic='The conference element' anchor='format-conference'>
     <p>A common use case is bookmarking of multi-user chat rooms.  A room is bookmarked using the &lt;conference/&gt; child element. The syntax is as follows.</p>
     <table caption='Syntax of conference element'>
@@ -156,6 +192,51 @@
     <p>This bookmark would be displayed in the client as 'Complete Works of Shakespeare' and would take the user to &lt;<link url='http://the-tech.mit.edu/Shakespeare/'>http://the-tech.mit.edu/Shakespeare/</link>&gt; when selected.</p>
     <p>Note: A bookmark set can contain any number of URLs.</p>
   </section2>
+  <section2 topic='The Pubsub subscription element' anchor='format-pubsub-subscription'>
+    <p>The &lt;subscription/&gt; element is designed for bookmarking Pubsub nodes on the XMPP network. It use the 'urn:xmpp:pubsub:subscription:0' namespace. The syntax is as follows.</p>
+    <table caption='Syntax of Pubsub subscription element'>
+      <tr>
+        <th>Attribute</th>
+        <th>Definition</th>
+        <th>Datatype</th>
+        <th>Inclusion</th>
+      </tr>
+      <tr>
+        <td>'name' attribute</td>
+        <td>A friendly name for the bookmark.</td>
+        <td>string</td>
+        <td>RECOMMENDED</td>
+      </tr>
+      <tr>
+        <td>'server' attribute</td>
+        <td>Any server's address</td>
+        <td>string</td>
+        <td>REQUIRED</td>
+      </tr>
+      <tr>
+        <td>'node' attribute</td>
+        <td>The subscription node</td>
+        <td>string</td>
+        <td>REQUIRED</td>
+      </tr>
+      <tr>
+        <td>'title' node</td>
+        <td>The official title of the node</td>
+        <td>string</td>
+        <td>OPTIONAL</td>
+      </tr>
+    </table>
+    <p>When the user use this bookmark, the client SHOULD go to the node page and display all informations and items relative to this node.</p>
+    <example caption='An example of the Pubsub subscription element'><![CDATA[
+    <storage xmlns='storage:bookmarks'>
+      <subscription xmlns="urn:xmpp:pubsub:subscription:0" name="My family party"
+            server="pubsub.shakespeare.lit" node="party">
+          <title>Party at the Capulets</title>
+      </subscription>
+    </storage>
+    ]]></example>
+    <p>Note: A bookmark set can contain any number of Pubsub subscriptions.</p>
+  </section2>
 </section1>
 
 <section1 topic='Storage' anchor='storage'>
@@ -330,7 +411,18 @@
       </xs:simpleContent>
     </xs:complexType>
   </xs:element>
-
+  
+  <xs:element name='storage'>
+    <xs:complexType>
+      <xs:attribute name='name' type='xs:string' use='recommended'/>
+      <xs:attribute name='server' type='xs:string' use='required'/>
+      <xs:attribute name='node' type='xs:string' use='required'/>
+      <xs:sequence>
+        <xs:element name='title' type='xs:string' minOccurs='0'/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  
   <xs:simpleType name='empty'>
     <xs:restriction base='xs:string'>
       <xs:enumeration value=''/>

Reply via email to