Le 22/08/2013 09:23, Jaussoin Timothée a écrit :
Le 19/08/2013 11:24, Jaussoin Timothée a écrit :
Le 15/08/2013 22:09, Jaussoin Timothée a écrit :
Le 15/08/2013 19:47, Peter Saint-Andre a écrit :
On 8/15/13 2:26 AM, Jaussoin Timothée wrote:
I have implemented the Bookmarks XEP
(http://xmpp.org/extensions/xep-0048.html) in Movim
(http://movim.eu/)
to store the conferences, URL and subscribed Pubsub feeds of the
user.
Maybe it can be a great idea to add a "category" tag with some
"default"
categories like news, blog, nsfw... With this kind of feature I'll be
able to tag more precisely the Pubsub items and maybe add special
behaviours one some of them (like hide by default the content of the
nsfw items or display in priority the news items).
In general, tagging is a good thing. :-)
Do you propose that we add a 'tag' attribute to both the <url/>
element
and the <conference/> element? Would it contain a space-separated list
of tags?
Peter
Hi !
I've also added a specific element to bookmark the pubsub nodes,
this way :
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<items node="storage:bookmarks">
<item id="current">
<storage xmlns="storage:bookmarks">
<conference jid="[email protected]" autojoin="1"
name="Movim">
<nick>edhelas</nick>
</conference>
<subscription xmlns="urn:xmpp:pubsub:subscription:0"
subid="" node="BouletCorp" server="pubsub.movim.eu">
<title/>
</subscription>
<subscription xmlns="urn:xmpp:pubsub:subscription:0"
subid="" node="CerealesMatin" server="pubsub.movim.eu">
<title/>
</subscription>
<subscription xmlns="urn:xmpp:pubsub:subscription:0"
subid="" node="Chez_Kek" server="pubsub.movim.eu">
<title/>
</subscription>
<subscription xmlns="urn:xmpp:pubsub:subscription:0"
subid="" node="JournalDuGeek" server="pubsub.movim.eu">
<title/>
</subscription>
<subscription xmlns="urn:xmpp:pubsub:subscription:0"
subid="" node="LinuxFr" server="pubsub.movim.eu">
<title/>
</subscription>
</storage>
</item>
</items>
</pubsub>
We can maybe re-use the same tag system than for the atom elements :
<conference jid="[email protected]" autojoin="1" name="Movim">
<nick>edhelas</nick>
<category term="Movim"/>
<category term="XMPP"/>
<category term="Jabber"/>
</conference>
It's just an idea :)
Hi !
I also think that allow subscriptions tags in Bookmarks can be a
great thing. For the moment we don't have any way to list all the
subscribed nodes on the user account.
Using <tag/> can be great too ;)
Tim
Hi everyone !
I really need your feedback on this thing to update the XEP.
edhelas
Hi !
I've made my modifications on the XEP, if you have some feedbacks don't
hesitate.
I'm not very sure of this syntax for the Bookmark Pubsub subscription
element :
<subscription xmlns="urn:xmpp:pubsub:subscription:0" name="My
family party"
server="pubsub.shakespeare.lit" node="party">
<title>Party at the Capulets</title>
</subscription>
Maybe we can merge the title and the name elements (here 'title' is the
officiel Pubsub node title, and 'name' is a personnal one).
edhelas
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Bookmarks</title>
<abstract>This specification defines an XML data format for use by XMPP clients in storing bookmarks to mult-user chatrooms and web pages. The chatroom bookmarking function includes the ability to auto-join rooms on login.</abstract>
&LEGALNOTICE;
<number>0048</number>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0060</spec>
<spec>XEP-0223</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>bookmarks</shortname>
<schemaloc>
<url>http://www.xmpp.org/schemas/bookmarks.xsd</url>
</schemaloc>
<author>
<firstname>Rachel</firstname>
<surname>Blackman</surname>
<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>
<version>1.1</version>
<date>2007-11-07</date>
<initials>psa</initials>
<remark><p>For security reasons, actively discouraged use of the password element; specified use of publish-subscribe private information nodes as the preferred storage mechanism; cleaned up the text and examples.</p></remark>
</revision>
<revision>
<version>1.0</version>
<date>2003-10-08</date>
<initials>psa</initials>
<remark><p>Per a vote of the Jabber Council, changed status to Active; also added XML schema.</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2003-05-13</date>
<initials>rcb</initials>
<remark><p>Re-focused to document only the existing protocol in use.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2002-10-03</date>
<initials>pgm</initials>
<remark><p>Typos, etc...</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2002-10-03</date>
<initials>pgm</initials>
<remark><p>Initial version.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>For ease-of-use in a Jabber client, it is desirable to have a way to store shortcuts to various services and resources (such as conference rooms and web pages) as "bookmarks" that can be displayed in the user's client. Several Jabber clients have already agreed on and implemented a method to provide this service; that informal agreement is documented and expanded upon in this document. In particular, we introduce the <storage/> element (qualified by the 'storage:bookmarks' namespace) as a container for this sort of this data. While bookmarks data can be stored using any XML storage mechanism, this document recommends one method that is specific to XMPP.</p>
</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 tree sub-elements are defined: <conference/> for bookmarking of &xep0045; rooms, <url/> for bookmarking &xep0060; nodes and <url/> 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 <tag/> 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 <conference/> child element. The syntax is as follows.</p>
<table caption='Syntax of conference element'>
<tr>
<th>Element or Attribute</th>
<th>Definition</th>
<th>Datatype</th>
<th>Inclusion</th>
</tr>
<tr>
<td>'autojoin' attribute</td>
<td>Whether the client should automatically join the conference room on login.</td>
<td>boolean defaulting to false &BOOLEANNOTE;</td>
<td>OPTIONAL</td>
</tr>
<tr>
<td>'jid' attribute</td>
<td>The JabberID of the chat room.</td>
<td>string</td>
<td>REQUIRED</td>
</tr>
<tr>
<td>'name' attribute</td>
<td>A friendly name for the bookmark.</td>
<td>string</td>
<td>RECOMMENDED</td>
</tr>
<tr>
<td><nick/> element</td>
<td>The user's preferred roomnick for the chatroom.</td>
<td>string</td>
<td>OPTIONAL</td>
</tr>
<tr>
<td><password/> element</td>
<td>Unencrypted string for the password needed to enter a password-protected room. For security reasons, use of this element is NOT RECOMMENDED.</td>
<td>string</td>
<td>NOT RECOMMENDED</td>
</tr>
</table>
<p>Note: The datatypes are as defined in &w3xmlschema2;.</p>
<example caption='An example of the conference element'><![CDATA[
<storage xmlns='storage:bookmarks'>
<conference name='Council of Oberon'
autojoin='true'
jid='[email protected]'>
<nick>Puck</nick>
</conference>
</storage>
]]></example>
<p>This bookmark would be displayed as 'Council of Oberon' and, if activated, would attempt to join the conference room '[email protected]' with nickname 'Puck'.</p>
<p>Note: A bookmark set may contain any number of conference rooms.</p>
</section2>
<section2 topic='The url element' anchor='format-url'>
<p>The <url/> element is designed for bookmarking web pages, i.e., HTTP or HTTPS URLs. The syntax is as follows.</p>
<table caption='Syntax of url 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>'url' attribute</td>
<td>The HTTP or HTTPS URL of the web page.</td>
<td>anyURI</td>
<td>REQUIRED</td>
</tr>
</table>
<p>When the user chooses a URL bookmark, the client should launch an appropriate browser or load the URL directly in the client (if the client is a web-client or includes web browsing functionality).</p>
<example caption='An example of the url element'><![CDATA[
<storage xmlns='storage:bookmarks'>
<url name='Complete Works of Shakespeare'
url='http://the-tech.mit.edu/Shakespeare/'/>
</storage>
]]></example>
<p>This bookmark would be displayed in the client as 'Complete Works of Shakespeare' and would take the user to <<link url='http://the-tech.mit.edu/Shakespeare/'>http://the-tech.mit.edu/Shakespeare/</link>> 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 <subscription/> 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'>
<p>It is RECOMMENDED to use &xep0060; for data storage, specifically through the use of personal data nodes hosted at the user's virtual publish-subscribe service as described in &xep0223; and illustrated in the following sections.</p>
<p>Note: In the past, &xep0049; was the recommended method (see the archived version of this specification at <<link url='http://www.xmpp.org/extensions/attic/xep-0048-1.0.html'>http://www.xmpp.org/extensions/attic/xep-0048-1.0.html</link>>). In addition, other methods could be used, such as HTTP or WebDAV.</p>
<section2 topic='Uploading Data' anchor='storage-pubsub-upload'>
<example caption='Client uploads data'><![CDATA[
<iq from='[email protected]/balcony' type='set' id='pip1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='storage:bookmarks'>
<item id='current'>
<storage xmlns='storage:bookmarks'>
<conference name='The Play's the Thing'
autojoin='true'
jid='[email protected]'>
<nick>JC</nick>
</conference>
</storage>
</item>
</publish>
<publish-options>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/pubsub#publish-options</value>
</field>
<field var='pubsub#persist_items'>
<value>true</value>
</field>
<field var='pubsub#access_model'>
<value>whitelist</value>
</field>
</x>
</publish-options>
</pubsub>
</iq>
]]></example>
<example caption='Server acknowledges successful storage'><![CDATA[
<iq to='[email protected]/balcony' type='result' id='pip1'/>
]]></example>
</section2>
<section2 topic='Receiving Notifications' anchor='storage-pubsub-notify'>
<p>The stored data is automatically pushed to all of the user's connected resources.</p>
<example caption='Publisher receives event notification'><![CDATA[
<message from='[email protected]'
to='[email protected]/balcony'
type='headline'
id='rnfoo1'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='storage:bookmarks'>
<item id='current'>
<storage xmlns='storage:bookmarks'>
<conference name='The Play's the Thing'
autojoin='true'
jid='[email protected]'>
<nick>JC</nick>
</conference>
</storage>
</item>
</items>
</event>
</message>
<message from='[email protected]'
to='[email protected]/chamber'
type='headline'
id='rnfoo2'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='storage:bookmarks'>
<item id='current'>
<storage xmlns='storage:bookmarks'>
<conference name='The Play's the Thing'
autojoin='true'
jid='[email protected]'>
<nick>JC</nick>
</conference>
</storage>
</item>
</items>
</event>
</message>
]]></example>
</section2>
<section2 topic='Retrieving Data' anchor='storage-pubsub-retrieve'>
<p>In order to retrieve stored data without receiving notifications (e.g., upon initial login), the user's client sends a retrieve-items request as specified in <cite>XEP-0060</cite>.</p>
<example caption='Client requests all items'><![CDATA[
<iq from='[email protected]/randomID' type='get' id='retrieve1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='storage:bookmarks'/>
</pubsub>
</iq>
]]></example>
<example caption='Server returns all items'><![CDATA[
<iq type='result'
to='[email protected]/randomID'
id='retrieve1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='storage:bookmarks'>
<item id='current'>
<storage xmlns='storage:bookmarks'>
<conference name='The Play's the Thing'
autojoin='true'
jid='[email protected]'>
<nick>JC</nick>
</conference>
</storage>
</item>
</items>
</pubsub>
</iq>
]]></example>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>Security considerations related to object persistent via publish-subscribe are described in XEP-0060 and <cite>XEP-0223</cite>.</p>
<p>Use of the <password/> child of the <conference/> element is NOT RECOMMENDED, since the password could be discovered by a third party, e.g. an eavesdropper (if channel encryption is not used) or a server administrator. However, the element MAY be used in suitably secure environments (e.g., where it is known that communications will not be sent over unencrypted channels and the server administrators are trusted). Clients SHOULD NOT default to storing passwords and MUST enable users to disable any password storage.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>No action by the ®ISTRAR; is required, since the 'storage:bookmarks' namespace is already included in the protocol namespaces registry (see &NAMESPACES;).</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='storage:bookmarks'
xmlns='storage:bookmarks'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0048: http://www.xmpp.org/extensions/xep-0048.html
</xs:documentation>
</xs:annotation>
<xs:element name='storage'>
<xs:complexType>
<xs:choice>
<xs:element ref='conference'/>
<xs:element ref='url'/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name='conference'>
<xs:complexType>
<xs:sequence>
<xs:element name='nick' type='xs:string' minOccurs='0'/>
<xs:element name='password' type='xs:string' minOccurs='0'/>
</xs:sequence>
<xs:attribute name='autojoin' type='xs:boolean' use='optional' default='false'/>
<xs:attribute name='jid' type='xs:string' use='required'/>
<xs:attribute name='name' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>
<xs:element name='url'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='empty'>
<xs:attribute name='name' type='xs:string' use='required'/>
<xs:attribute name='url' type='xs:string' use='required'/>
</xs:extension>
</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=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section1>
<section1 topic='Author Note' anchor='authornote'>
<p>Peter Millard, a co-author of this specification from version 0.1 through version 1.0, died on April 26, 2006.</p>
</section1>
</xep>