1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-13 21:05:09 -05:00
xeps/xep-0048.xml

172 lines
7.8 KiB
XML
Raw Normal View History

<?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>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>
&LEGALNOTICE;
<number>0048</number>
<status>Active</status>
<type>Historical</type>
<sig>Standards</sig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0049</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>rcb@ceruleanstudios.com</email>
<jid>sparks@jabber.org</jid>
</author>
&pgmillard;
<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>
</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>
</revision>
<revision>
<version>0.2</version>
<date>2002-10-03</date>
<initials>pgm</initials>
<remark>Typos, etc...</remark>
</revision>
<revision>
<version>0.1</version>
<date>2002-10-03</date>
<initials>pgm</initials>
<remark>Initial version.</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>
<section1 topic='The storage:bookmarks Namespace'>
<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'>
<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>
<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>
</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 &lt;<link url='http://exodus.jabberstudio.org/'>http://exodus.jabberstudio.org/</link>&gt;.</note> and Rival Messenger <note>Rival Messenger, see &lt;<link url='http://rival.chote.net'>http://rival.chote.net/</link>&gt;.</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'>
<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>
<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>
</section1>
<section1 topic='Security Considerations'>
<p>Security considerations related to private XML storage are described in XEP-0049.</p>
</section1>
<section1 topic='IANA Considerations'>
<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 &REGISTRAR; as a result of this document.</p>
</section1>
<section1 topic='XML 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='url'/>
<xs:element ref='conference'/>
</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>
<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: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>