mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
1.1pre1
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1207 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
c055c0f536
commit
e9d6616bb2
260
xep-0048.xml
260
xep-0048.xml
@ -7,15 +7,16 @@
|
||||
<xep>
|
||||
<header>
|
||||
<title>Bookmark Storage</title>
|
||||
<abstract>This specification documents a protocol for the storage of bookmarks to conference rooms and other entities in a Jabber user's account.</abstract>
|
||||
<abstract>This document defines an XML data format for storing bookmarks to XMPP conference rooms and HTTP URLs.</abstract>
|
||||
&LEGALNOTICE;
|
||||
<number>0048</number>
|
||||
<status>Active</status>
|
||||
<type>Historical</type>
|
||||
<status>Proposed</status>
|
||||
<type>Standards Track</type>
|
||||
<sig>Standards</sig>
|
||||
<dependencies>
|
||||
<spec>XMPP Core</spec>
|
||||
<spec>XEP-0049</spec>
|
||||
<spec>XEP-0223</spec>
|
||||
</dependencies>
|
||||
<supersedes/>
|
||||
<supersededby/>
|
||||
@ -30,59 +31,194 @@
|
||||
<jid>sparks@jabber.org</jid>
|
||||
</author>
|
||||
&pgmillard;
|
||||
&stpeter;
|
||||
<revision>
|
||||
<version>1.1pre1</version>
|
||||
<date>in progress, last updated 2007-09-12</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Specified use of PEP as a storage mechanism in addition to existing jabber:iq:private method.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>1.0</version>
|
||||
<date>2003-10-08</date>
|
||||
<initials>psa</initials>
|
||||
<remark>Per a vote of the Jabber Council, changed status to Active; also added XML schema.</remark>
|
||||
<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>Re-focused to document only the existing protocol in use.</remark>
|
||||
<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>Typos, etc...</remark>
|
||||
<remark><p>Typos, etc...</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.1</version>
|
||||
<date>2002-10-03</date>
|
||||
<initials>pgm</initials>
|
||||
<remark>Initial version.</remark>
|
||||
<remark><p>Initial version.</p></remark>
|
||||
</revision>
|
||||
</header>
|
||||
<section1 topic='Introduction'>
|
||||
<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 webpages) as 'bookmarks' which 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.</p>
|
||||
<p>&xep0049; provides us with a convenient method for storing user data on the server using jabber:iq:private; all we need to do is define a namespace and schema for storing this sort of information. To this end, we introduce the 'storage' element, and the 'storage:bookmarks' to handle this data.</p>
|
||||
|
||||
<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 the <storage/> element can be stored using any XML storage mechanism, this document describes two such methods that are specific to XMPP.</p>
|
||||
</section1>
|
||||
<section1 topic='The storage:bookmarks Namespace'>
|
||||
|
||||
<section1 topic='Data Format' anchor='format'>
|
||||
<p>A storage element marked by the storage:bookmarks namespace will contain a collection of child elements, each representing a 'bookmark' to be displayed in the client. At present, only two sub-elements are defined, 'conference' for conference rooms and 'url' for normal URLs.</p>
|
||||
<p>All elements under storage MUST allow a 'name' tag, which is the friendly name by which they will be displayed in the client. If an element lacks a 'name' tag, the client SHOULD generate an appropriate substitution based on the other available data.</p>
|
||||
<section2 topic='The url element'>
|
||||
<section2 topic='The conference element' anchor='format-conference'>
|
||||
<p>One of the most common uses of bookmarks will likely be to bookmark conference rooms on various Jabber servers. It is this aspect of the bookmark system which is used today by existing clients such as Exodus <note>Exodus, see <<link url='http://exodus.jabberstudio.org/'>http://exodus.jabberstudio.org/</link>>.</note> and Rival Messenger <note>Rival Messenger, see <<link url='http://rival.chote.net'>http://rival.chote.net/</link>>.</note>. In addition to the required 'jid' attribute, the conference element also possesses an 'autojoin' attribute, which determines whether or not the client should automatically join that conference room on login; this attribute is of type xs:boolean (see &w3xmlschema2;) and the default value is "false". &BOOLEANNOTE;</p>
|
||||
<p>The conference element MAY also contain 'nick' and 'password' sub-elements; the XML character data from these elements should be used when joining the room from the bookmark. Password is, of course, important for joining potentially password-protected &xep0045; rooms.</p>
|
||||
<example caption='An example of the conference element'><![CDATA[
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<conference name='Council of Oberon'
|
||||
autojoin='true'
|
||||
jid='council@conference.underhill.org'>
|
||||
<nick>Puck</nick>
|
||||
<password>titania</password>
|
||||
</conference>
|
||||
</storage>
|
||||
]]></example>
|
||||
<p>This bookmark would be displayed as 'Council of Oberon' and, if activated, would attempt to join the conference room 'council@conference.underhill.org' with nickname 'Puck' and password 'titania'. A bookmark set may contain any number of conference rooms.</p>
|
||||
</section2>
|
||||
<section2 topic='The url element' anchor='format-url'>
|
||||
<p>URLs are fairly simple, as they only need to store a URL and a title, and the client then can simply launch the appropriate browser.</p>
|
||||
<p>A URL element therefore only needs a 'url' tag in addition to the required 'name', like so:</p>
|
||||
<p>A URL element therefore only needs a 'url' tag in addition to the required 'name'.</p>
|
||||
<example caption='An example of the URL element'><![CDATA[
|
||||
<iq type='result' id='1'>
|
||||
<query xmlns='jabber:iq:private'>
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<url name='Complete Works of Shakespeare'
|
||||
url='http://the-tech.mit.edu/Shakespeare/'/>
|
||||
</storage>
|
||||
</query>
|
||||
</iq>
|
||||
]]>
|
||||
</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> if activated. A bookmark set can contain any number of urls.</p>
|
||||
]]></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> if activated. A bookmark set can contain any number of urls.</p>
|
||||
</section2>
|
||||
<section2 topic='The conference element'>
|
||||
<p>One of the most common uses of bookmarks will likely be to bookmark conference rooms on various Jabber servers. It is this aspect of the bookmark system which is used today by existing clients such as Exodus <note>Exodus, see <<link url='http://exodus.jabberstudio.org/'>http://exodus.jabberstudio.org/</link>>.</note> and Rival Messenger <note>Rival Messenger, see <<link url='http://rival.chote.net'>http://rival.chote.net/</link>>.</note>. In addition to the required 'jid' attribute, the conference element also possesses an 'autojoin' attribute, which determines whether or not the client should automatically join that conference room on login; this attribute is of type xs:boolean (see &w3xmlschema2;) and the default value is "false". &BOOLEANNOTE;</p>
|
||||
<p>The conference element MAY also contain 'nick' and 'password' sub-elements; the XML character data from these elements should be used when joining the room from the bookmark. Password is, of course, important for joining potentially password-protected &xep0045; rooms.</p>
|
||||
<example caption='An example of the conference element'><![CDATA[
|
||||
<iq type='result' id='2'>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Storage Methods' anchor='storage'>
|
||||
<p>It is recommended to use either &xep0060; or &xep0049; in order to store the data format defined above; however, other methods could be used, such as HTTP.</p>
|
||||
<section2 topic='Publish-Subscribe' anchor='storage-pubsub'>
|
||||
<p>A client may use Publish-Subscribe (XEP-0060) for data storage, specifically through the use of personal data nodes hosted at the user's virtual publish-subscribe service as described in &xep0223;.</p>
|
||||
<section3 topic='Uploading Data' anchor='storage-pubsub-upload'>
|
||||
<example caption='Client uploads data'><![CDATA[
|
||||
<iq from='juliet@capulet.lit/balcony' type='set' id='pip1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='storage:bookmarks'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<conference name='The Play's the Thing'
|
||||
autojoin='true'
|
||||
jid='theplay@conference.shakespeare.lit'>
|
||||
<nick>JC</nick>
|
||||
<password>Gl0b3</password>
|
||||
</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='juliet@capulet.lit/balcony' type='result' id='pip1'/>
|
||||
]]></example>
|
||||
</section3>
|
||||
<section3 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='juliet@capulet.lit'
|
||||
to='juliet@capulet.lit/balcony'
|
||||
type='headline'
|
||||
id='rnfoo1'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='storage:bookmarks'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<conference name='The Play's the Thing'
|
||||
autojoin='true'
|
||||
jid='theplay@conference.shakespeare.lit'>
|
||||
<nick>JC</nick>
|
||||
<password>Gl0b3</password>
|
||||
</conference>
|
||||
</storage>
|
||||
</item>
|
||||
</items>
|
||||
</event>
|
||||
</message>
|
||||
|
||||
<message from='juliet@capulet.lit'
|
||||
to='juliet@capulet.lit/chamber'
|
||||
type='headline'
|
||||
id='rnfoo2'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='storage:bookmarks'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<note jid='hamlet@shakespeare.lit'
|
||||
cdate='2004-09-24T15:23:21Z'
|
||||
mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
|
||||
<note jid='juliet@capulet.com'
|
||||
cdate='2004-09-27T17:23:14Z'
|
||||
mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
|
||||
</storage>
|
||||
</item>
|
||||
</items>
|
||||
</event>
|
||||
</message>
|
||||
]]></example>
|
||||
</section3>
|
||||
<section3 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='juliet@capulet.lit/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='juliet@capulet.lit/randomID'
|
||||
id='retrieve1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<items node='storage:bookmarks'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<conference name='The Play's the Thing'
|
||||
autojoin='true'
|
||||
jid='theplay@conference.shakespeare.lit'>
|
||||
<nick>JC</nick>
|
||||
<password>Gl0b3</password>
|
||||
</conference>
|
||||
</storage>
|
||||
</item>
|
||||
</items>
|
||||
</pubsub>
|
||||
</iq>
|
||||
]]></example>
|
||||
</section3>
|
||||
</section2>
|
||||
<section2 topic='Private XML Storage' anchor='storage-privatexml'>
|
||||
<p>A client may use Private Data Storage (XEP-0049) for data storage.</p>
|
||||
<section3 topic='Uploading Data' anchor='storage-privatexml-upload'>
|
||||
<example caption='Client uploads data'><![CDATA[
|
||||
<iq type='set' id='a1'>
|
||||
<query xmlns='jabber:iq:private'>
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<conference name='Council of Oberon'
|
||||
@ -93,21 +229,53 @@
|
||||
</conference>
|
||||
</storage>
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
<p>This bookmark would be displayed as 'Council of Oberon' and, if activated, would attempt to join the conference room 'council@conference.underhill.org' with nickname 'Puck' and password 'titania'. A bookmark set may contain any number of conference rooms.</p>
|
||||
</iq>
|
||||
]]></example>
|
||||
<example caption='Server acknowledges successful storage'><![CDATA[
|
||||
<iq type='result' id='priv1'/>
|
||||
]]></example>
|
||||
<p>Note: The private XML storage protocol does not provide notifications to all connected resources, only an acknowledgement to the uploading resource.</p>
|
||||
</section3>
|
||||
<section3 topic='Retrieving Data' anchor='storage-privatexml-retrieve'>
|
||||
<example caption='Client requests stored data'><![CDATA[
|
||||
<iq type='get' id='a2'>
|
||||
<query xmlns='jabber:iq:private'>
|
||||
<storage xmlns='storage:bookmarks'/>
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
<example caption='Server returns stored data'><![CDATA[
|
||||
<iq type='result' id='a2'>
|
||||
<query xmlns='jabber:iq:private'>
|
||||
<storage xmlns='storage:bookmarks'>
|
||||
<conference name='Council of Oberon'
|
||||
autojoin='true'
|
||||
jid='council@conference.underhill.org'>
|
||||
<nick>Puck</nick>
|
||||
<password>titania</password>
|
||||
</conference>
|
||||
</storage>
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
</section3>
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='Security Considerations'>
|
||||
|
||||
<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>Security considerations related to private XML storage are described in XEP-0049.</p>
|
||||
</section1>
|
||||
<section1 topic='IANA Considerations'>
|
||||
|
||||
<section1 topic='IANA Considerations' anchor='iana'>
|
||||
<p>This document requires no interaction with &IANA;.</p>
|
||||
</section1>
|
||||
<section1 topic='XMPP Registrar Considerations'>
|
||||
<p>No namespaces or parameters need to be registered with the ®ISTRAR; as a result of this document.</p>
|
||||
|
||||
<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'>
|
||||
|
||||
<section1 topic='XML Schema' anchor='registrar'>
|
||||
<code><![CDATA[
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
@ -127,23 +295,12 @@
|
||||
<xs:element name='storage'>
|
||||
<xs:complexType>
|
||||
<xs:choice>
|
||||
<xs:element ref='url'/>
|
||||
<xs:element ref='conference'/>
|
||||
<xs:element ref='url'/>
|
||||
</xs:choice>
|
||||
</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='conference'>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@ -156,6 +313,17 @@
|
||||
</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:simpleType name='empty'>
|
||||
<xs:restriction base='xs:string'>
|
||||
<xs:enumeration value=''/>
|
||||
@ -165,7 +333,9 @@
|
||||
</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>
|
||||
|
302
xep-0145.xml
302
xep-0145.xml
@ -5,66 +5,197 @@
|
||||
]>
|
||||
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
||||
<xep>
|
||||
<header>
|
||||
<title>Annotations</title>
|
||||
<abstract>This document defines a protocol for making annotations about roster items and other entities.</abstract>
|
||||
&LEGALNOTICE;
|
||||
<number>0145</number>
|
||||
<status>Active</status>
|
||||
<type>Historical</type>
|
||||
<sig>Standards</sig>
|
||||
<approver>Council</approver>
|
||||
<dependencies>
|
||||
<spec>XMPP Core</spec>
|
||||
<spec>XEP-0049</spec>
|
||||
</dependencies>
|
||||
<supersedes/>
|
||||
<supersededby/>
|
||||
<shortname>rosternotes</shortname>
|
||||
<schemaloc>
|
||||
<url>http://www.xmpp.org/schemas/rosternotes.xsd</url>
|
||||
</schemaloc>
|
||||
<author>
|
||||
<firstname>Stefan</firstname>
|
||||
<surname>Strigler</surname>
|
||||
<email>steve@zeank.in-berlin.de</email>
|
||||
<jid>zeank@jwchat.org</jid>
|
||||
</author>
|
||||
<revision>
|
||||
<version>1.0</version>
|
||||
<date>2006-03-23</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Per a vote of the Jabber Council, advanced to Active.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.2</version>
|
||||
<date>2005-07-15</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Editorial review: changed type to Historical; changed namespace to storage:rosternotes; corrected schema; specified use of DateTime profile from XEP-0082; corrected some small textual errors.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.1</version>
|
||||
<date>2004-11-05</date>
|
||||
<initials>st</initials>
|
||||
<remark><p>Initial version.</p></remark>
|
||||
</revision>
|
||||
</header>
|
||||
<section1 topic='Introduction' anchor='intro'>
|
||||
<header>
|
||||
<title>Annotations</title>
|
||||
<abstract>This document defines an XML data format for making annotations about XMPP roster items and other entities.</abstract>
|
||||
&LEGALNOTICE;
|
||||
<number>0145</number>
|
||||
<status>Proposed</status>
|
||||
<type>Standards Track</type>
|
||||
<sig>Standards</sig>
|
||||
<approver>Council</approver>
|
||||
<dependencies>
|
||||
<spec>XMPP Core</spec>
|
||||
<spec>XEP-0049</spec>
|
||||
</dependencies>
|
||||
<supersedes/>
|
||||
<supersededby/>
|
||||
<shortname>rosternotes</shortname>
|
||||
<schemaloc>
|
||||
<url>http://www.xmpp.org/schemas/rosternotes.xsd</url>
|
||||
</schemaloc>
|
||||
<author>
|
||||
<firstname>Stefan</firstname>
|
||||
<surname>Strigler</surname>
|
||||
<email>steve@zeank.in-berlin.de</email>
|
||||
<jid>zeank@jwchat.org</jid>
|
||||
</author>
|
||||
&stpeter;
|
||||
<revision>
|
||||
<version>1.1pre1</version>
|
||||
<date>in progress, last updated 2007-09-12</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Specified use of PEP as a storage mechanism in addition to existing jabber:iq:private method.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>1.0</version>
|
||||
<date>2006-03-23</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Per a vote of the Jabber Council, advanced to Active.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.2</version>
|
||||
<date>2005-07-15</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Editorial review: changed type to Historical; changed namespace to storage:rosternotes; corrected schema; specified use of DateTime profile from XEP-0082; corrected some small textual errors.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.1</version>
|
||||
<date>2004-11-05</date>
|
||||
<initials>st</initials>
|
||||
<remark><p>Initial version.</p></remark>
|
||||
</revision>
|
||||
</header>
|
||||
|
||||
<p>Many modern IM clients offer functionality that enables users to make notes about items in their roster. This comes in handy if users don't have meaningful information in their vCard or if you need to remember additional things related to a roster item.</p>
|
||||
<section1 topic='Introduction' anchor='intro'>
|
||||
<p>Many modern IM clients offer functionality that enables a user to make notes about the contacts in their roster. This is helpful if such contacts do not have meaningful information in their vCard or if the user needs to remember additional information related to a roster item. To define such functionality, we specify a <storage> element (similar to that introduced in &xep0048;) and appropriate child elements, qualified by a new namespace of 'storage:rosternotes'. While the <storage/> element can be stored using any XML storage mechanism, this document describes two such methods that are specific to XMPP.</p>
|
||||
</section1>
|
||||
|
||||
<p>This specification defines a protocol for storing annotations about a given set of entities. Its primary goal is to enable users to store some personal piece of information with their roster items. &xep0049; provides with a convenient method for storing user data on the server using the 'jabber:iq:private' namespace; all we need to do is define a namespace and schema for storing this sort of information. For this the 'storage' element introduced in &xep0048; is reused, and a new namespace of 'storage:rosternotes' is added.</p>
|
||||
<section1 topic='Data Format' anchor='format'>
|
||||
<p>Annotations are stored using a <storage/> element qualified by the 'storage:rosternotes' namespace. This element contains a collection of one or more <note/> elements, each representing a note about a given entity. For any given JID there MUST NOT be more than one note.</p>
|
||||
<p>The 'jid' attribute of the <note/> element SHOULD be used without a resource, i.e., it SHOULD be a bare JID (&BAREJID;) rather than a full JID (&FULLJID;). Along with the annotation a client MAY choose to store the creation time ('cdate') and modification time ('mdate') as attributes to the <note/> element containing the annotation; these attributes MUST conform to the DateTime profile specified in &xep0082; and the timezone SHOULD be UTC.</p>
|
||||
<example caption='Some annotations'><![CDATA[
|
||||
<storage xmlns='storage:rosternotes'>
|
||||
<note jid='hamlet@shakespeare.lit'
|
||||
cdate='2004-09-24T15:23:21Z'
|
||||
mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
|
||||
<note jid='juliet@capulet.com'
|
||||
cdate='2004-09-27T17:23:14Z'
|
||||
mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
|
||||
</storage>
|
||||
]]></example>
|
||||
<p>Note: All notes are stored as a "bundle" within the same <storage/> element.</p>
|
||||
</section1>
|
||||
|
||||
</section1>
|
||||
<section1 topic='Storage Methods' anchor='storage'>
|
||||
<p>It is recommended to use either &xep0060; or &xep0049; in order to store the data format defined above; however, other methods could be used, such as HTTP.</p>
|
||||
<section2 topic='Publish-Subscribe' anchor='storage-pubsub'>
|
||||
<p>A client may use Publish-Subscribe (XEP-0060) for data storage, specifically through the use of personal data nodes hosted at the user's virtual publish-subscribe service as described in &xep0223;.</p>
|
||||
<section3 topic='Uploading Data' anchor='storage-pubsub-upload'>
|
||||
<example caption='Client uploads data'><![CDATA[
|
||||
<iq from='juliet@capulet.lit/balcony' type='set' id='pip1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<publish node='storage:rosternotes'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:rosternotes'>
|
||||
<note jid='hamlet@shakespeare.lit'
|
||||
cdate='2004-09-24T15:23:21Z'
|
||||
mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
|
||||
<note jid='juliet@capulet.com'
|
||||
cdate='2004-09-27T17:23:14Z'
|
||||
mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
|
||||
</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='juliet@capulet.lit/balcony' type='result' id='pip1'/>
|
||||
]]></example>
|
||||
</section3>
|
||||
<section3 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='juliet@capulet.lit'
|
||||
to='juliet@capulet.lit/balcony'
|
||||
type='headline'
|
||||
id='rnfoo1'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='storage:rosternotes'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:rosternotes'>
|
||||
<note jid='hamlet@shakespeare.lit'
|
||||
cdate='2004-09-24T15:23:21Z'
|
||||
mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
|
||||
<note jid='juliet@capulet.com'
|
||||
cdate='2004-09-27T17:23:14Z'
|
||||
mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
|
||||
</storage>
|
||||
</item>
|
||||
</items>
|
||||
</event>
|
||||
</message>
|
||||
|
||||
<section1 topic='The storage:rosternotes Namespace' anchor='ns_storage_notes'>
|
||||
|
||||
<p>Annotations are stored using server-side private XML storage (the 'jabber:iq:private' namespace). A storage element marked by the storage:rosternotes namespace contains a collection of one or more <note/> elements, each representing a note about a given entity. For any given JID there MUST NOT be more than one note.</p>
|
||||
|
||||
<p>The 'jid' attribute of the <note/> element SHOULD be used without a resource. Along with the annotation a client MAY choose to store creation time ('cdate') and modification time ('mdate') as attributes to the <note/> element containing the note; these attributes MUST conform to the DateTime profile specified in &xep0082; and the timezone SHOULD be UTC.</p>
|
||||
|
||||
<example caption='Storing Annotations'>
|
||||
<![CDATA[
|
||||
<message from='juliet@capulet.lit'
|
||||
to='juliet@capulet.lit/chamber'
|
||||
type='headline'
|
||||
id='rnfoo2'>
|
||||
<event xmlns='http://jabber.org/protocol/pubsub#event'>
|
||||
<items node='storage:rosternotes'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:rosternotes'>
|
||||
<note jid='hamlet@shakespeare.lit'
|
||||
cdate='2004-09-24T15:23:21Z'
|
||||
mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
|
||||
<note jid='juliet@capulet.com'
|
||||
cdate='2004-09-27T17:23:14Z'
|
||||
mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
|
||||
</storage>
|
||||
</item>
|
||||
</items>
|
||||
</event>
|
||||
</message>
|
||||
]]></example>
|
||||
</section3>
|
||||
<section3 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='juliet@capulet.lit/randomID' type='get' id='retrieve1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<items node='storage:rosternotes'/>
|
||||
</pubsub>
|
||||
</iq>
|
||||
]]></example>
|
||||
<example caption='Server returns all items'><![CDATA[
|
||||
<iq type='result'
|
||||
to='juliet@capulet.lit/randomID'
|
||||
id='retrieve1'>
|
||||
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||
<items node='storage:rosternotes'>
|
||||
<item id='SINGLETON'>
|
||||
<storage xmlns='storage:rosternotes'>
|
||||
<note jid='hamlet@shakespeare.lit'
|
||||
cdate='2004-09-24T15:23:21Z'
|
||||
mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
|
||||
<note jid='juliet@capulet.com'
|
||||
cdate='2004-09-27T17:23:14Z'
|
||||
mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
|
||||
</storage>
|
||||
</item>
|
||||
</items>
|
||||
</pubsub>
|
||||
</iq>
|
||||
]]></example>
|
||||
</section3>
|
||||
</section2>
|
||||
<section2 topic='Private XML Storage' anchor='storage-privatexml'>
|
||||
<p>A client may use Private Data Storage (XEP-0049) for data storage.</p>
|
||||
<section3 topic='Uploading Data' anchor='storage-privatexml-upload'>
|
||||
<example caption='Client uploads data'><![CDATA[
|
||||
<iq type='set' id='a1'>
|
||||
<query xmlns='jabber:iq:private'>
|
||||
<storage xmlns='storage:rosternotes'>
|
||||
@ -77,23 +208,21 @@
|
||||
</storage>
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
|
||||
<p>Note: All notes are stored as a "bundle" within the same <storage/> element.</p>
|
||||
|
||||
<p>Retrieving notes uses the protocol described in <cite>XEP-0049</cite>.</p>
|
||||
|
||||
<example caption='Retrieving Annotations'>
|
||||
<![CDATA[
|
||||
]]></example>
|
||||
<example caption='Server acknowledges successful storage'><![CDATA[
|
||||
<iq type='result' id='priv1'/>
|
||||
]]></example>
|
||||
<p>Note: The private XML storage protocol does not provide notifications to all connected resources, only an acknowledgement to the uploading resource.</p>
|
||||
</section3>
|
||||
<section3 topic='Retrieving Data' anchor='storage-privatexml-retrieve'>
|
||||
<example caption='Client requests stored data'><![CDATA[
|
||||
<iq type='get' id='a2'>
|
||||
<query xmlns='jabber:iq:private'>
|
||||
<storage xmlns='storage:rosternotes'/>
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
|
||||
<example caption='Server response'>
|
||||
<![CDATA[
|
||||
]]></example>
|
||||
<example caption='Server returns stored data'><![CDATA[
|
||||
<iq type='result' id='a2'>
|
||||
<query xmlns='jabber:iq:private'>
|
||||
<storage xmlns='storage:rosternotes'>
|
||||
@ -106,26 +235,26 @@
|
||||
</storage>
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
]]></example>
|
||||
</section3>
|
||||
</section2>
|
||||
</section1>
|
||||
|
||||
<p>For error conditions please refer to <cite>XEP-0049</cite>.</p>
|
||||
<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>Security considerations related to private XML storage are described in <cite>XEP-0049</cite>.</p>
|
||||
</section1>
|
||||
|
||||
</section1>
|
||||
<section1 topic='IANA Considerations' anchor='iana'>
|
||||
<p>No interaction with &IANA; is required as a result of this document.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Security Considerations' anchor='security'>
|
||||
<p>Security considerations related to private XML storage are described in <cite>XEP-0049</cite>.</p>
|
||||
</section1>
|
||||
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
||||
<p>No action by the ®ISTRAR; is required, since the 'storage:rosternotes' namespace is already included in the protocol namespaces registry (see &NAMESPACES;).</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='IANA Considerations' anchor='iana'>
|
||||
<p>No interaction with &IANA; is required as a result of this document.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
||||
<p>No namespaces or parameters need to be registered with the ®ISTRAR; as a result of this document.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='XML Schema' anchor='schema'>
|
||||
<code><![CDATA[
|
||||
<section1 topic='XML Schema' anchor='schema'>
|
||||
<code><![CDATA[
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<xs:schema
|
||||
@ -162,6 +291,7 @@
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
||||
]]></code>
|
||||
</section1>
|
||||
]]></code>
|
||||
</section1>
|
||||
|
||||
</xep>
|
||||
|
Loading…
Reference in New Issue
Block a user