1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 18:22:24 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1298 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2007-10-18 20:52:37 +00:00
parent 4909741db7
commit ea7d5986de

View File

@ -7,7 +7,7 @@
<xep> <xep>
<header> <header>
<title>Bookmarks</title> <title>Bookmarks</title>
<abstract>This document defines an XML data format for storing bookmarks to XMPP conference rooms and HTTP URLs.</abstract> <abstract>This document defines an XML data format for storing bookmarks to chat rooms and web pages in XMPP.</abstract>
&LEGALNOTICE; &LEGALNOTICE;
<number>0048</number> <number>0048</number>
<status>Proposed</status> <status>Proposed</status>
@ -33,10 +33,10 @@
&pgmillard; &pgmillard;
&stpeter; &stpeter;
<revision> <revision>
<version>1.1pre3</version> <version>1.1pre4</version>
<date>in progress, last updated 2007-09-27</date> <date>in progress, last updated 2007-10-18</date>
<initials>psa</initials> <initials>psa</initials>
<remark><p>Specified use of publish-subscribe private information nodes as the preferred storage mechanism.</p></remark> <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>
<revision> <revision>
<version>1.0</version> <version>1.0</version>
@ -65,37 +65,96 @@
</header> </header>
<section1 topic='Introduction' anchor='intro'> <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 &lt;storage/&gt; element can be stored using any XML storage mechanism, this document describes two such methods that are specific to XMPP.</p> <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 &lt;storage/&gt; 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>
<section1 topic='Data Format' anchor='format'> <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>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>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> <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='The conference element' anchor='format-conference'> <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. 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>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>
<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> <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>&lt;nick/&gt; element</td>
<td>The user's preferred roomnick for the chatroom.</td>
<td>string</td>
<td>OPTIONAL</td>
</tr>
<tr>
<td>&lt;password/&gt; element</td>
<td>Unencrypted string for the password needed to enter a password-protected room. Use of this element is now deprecated for security reasons.</td>
<td>string</td>
<td>DEPRECATED</td>
</tr>
</table>
<p>Note: The datatypes are as defined in &w3xmlschema2;.</p>
<example caption='An example of the conference element'><![CDATA[ <example caption='An example of the conference element'><![CDATA[
<storage xmlns='storage:bookmarks'> <storage xmlns='storage:bookmarks'>
<conference name='Council of Oberon' <conference name='Council of Oberon'
autojoin='true' autojoin='true'
jid='council@conference.underhill.org'> jid='council@conference.underhill.org'>
<nick>Puck</nick> <nick>Puck</nick>
<password>titania</password>
</conference> </conference>
</storage> </storage>
]]></example> ]]></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> <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'.</p>
<p>Note: A bookmark set may contain any number of conference rooms.</p>
</section2> </section2>
<section2 topic='The url element' anchor='format-url'> <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>The &lt;url/&gt; element is designed for bookmarking web pages, i.e., HTTP or HTTPS URLs. The syntax is as follows.</p>
<p>A URL element therefore only needs a 'url' tag in addition to the required 'name'.</p> <table caption='Syntax of url element'>
<example caption='An example of the URL element'><![CDATA[ <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'> <storage xmlns='storage:bookmarks'>
<url name='Complete Works of Shakespeare' <url name='Complete Works of Shakespeare'
url='http://the-tech.mit.edu/Shakespeare/'/> url='http://the-tech.mit.edu/Shakespeare/'/>
</storage> </storage>
]]></example> ]]></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> <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>
</section1> </section1>
@ -113,7 +172,6 @@
autojoin='true' autojoin='true'
jid='theplay@conference.shakespeare.lit'> jid='theplay@conference.shakespeare.lit'>
<nick>JC</nick> <nick>JC</nick>
<password>Gl0b3</password>
</conference> </conference>
</storage> </storage>
</item> </item>
@ -153,7 +211,6 @@
autojoin='true' autojoin='true'
jid='theplay@conference.shakespeare.lit'> jid='theplay@conference.shakespeare.lit'>
<nick>JC</nick> <nick>JC</nick>
<password>Gl0b3</password>
</conference> </conference>
</storage> </storage>
</item> </item>
@ -203,7 +260,6 @@
autojoin='true' autojoin='true'
jid='theplay@conference.shakespeare.lit'> jid='theplay@conference.shakespeare.lit'>
<nick>JC</nick> <nick>JC</nick>
<password>Gl0b3</password>
</conference> </conference>
</storage> </storage>
</item> </item>
@ -216,6 +272,7 @@
<section1 topic='Security Considerations' anchor='security'> <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 object persistent via publish-subscribe are described in XEP-0060 and <cite>XEP-0223</cite>.</p>
<p>As noted, use of the &lt;password/&gt; child of the &lt;conference/&gt; element is deprecated and discouraged, since the password could be discovered by a third party, e.g. an eavedropper (if channel encryption is not used) or a server administrator.</p>
</section1> </section1>
<section1 topic='IANA Considerations' anchor='iana'> <section1 topic='IANA Considerations' anchor='iana'>
@ -256,7 +313,6 @@
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name='nick' type='xs:string' minOccurs='0'/> <xs:element name='nick' type='xs:string' minOccurs='0'/>
<xs:element name='password' type='xs:string' minOccurs='0'/>
</xs:sequence> </xs:sequence>
<xs:attribute name='autojoin' type='xs:boolean' use='optional' default='false'/> <xs:attribute name='autojoin' type='xs:boolean' use='optional' default='false'/>
<xs:attribute name='jid' type='xs:string' use='required'/> <xs:attribute name='jid' type='xs:string' use='required'/>