%ents; ]>
Bookmarks 2 (This Time it's Serious) This specification defines a syntax and storage profile for keeping a list of chatroom bookmarks on the server. &LEGALNOTICE; 0402 Experimental Standards Track Standards Council XEP-0223 bookmarks2 standards &dcridland; Jan-Carel Brand jc@opkode.com jc@opkode.com 0.2.1 2018-07-22 egp
  • Add missing dependency on XEP-0223.
  • Remove extra whitespace at the end of examples.
0.2.0 2018-03-28 jcb Remove password element, add examples, update security considerations. 0.1.0 2018-03-28 XEP Editor (jwi) Accepted by vote of Council on 2018-03-21. 0.0.1 2018-03-17 dwd/jcb

First draft

The original Bookmarks specification (&xep0048;) used the widely available Private XML Storage (&xep0049;), but stored all bookmarks in a single element. When the specification was moved to the Standards Track and Draft, it was also updated to use the user's Pubsub service (&xep0223;), but kept this single element containing all bookmarks inside a single Pubsub item.

Most implementations have kept to the original, Private XML Storage based solution, and while some newer implementations have used Pubsub, these are limited in capability by the use of a single item.

This specification resolves both issues by providing a new Bookmarks specification to migrate to, and takes the opportunity to update the XML namespace in use as well. The URL storage is dropped, since it is rarely used. Storage of URL bookmarks is therefore out of scope.

Clients store each bookmarked chatroom as a Pubsub item within the '&namespace;' node. Each item SHALL have, as item id, the Room JID of the chatroom (eg, coven@chat.shakespeare.lit).

The payload of the item SHALL be a conference element qualified by the '&namespace;' namespace, with the following syntax:

Element or Attribute Definition Datatype Inclusion
'autojoin' attribute Whether the client should automatically join the conference room on login. boolean defaulting to false &BOOLEANNOTE; OPTIONAL
'name' attribute A friendly name for the bookmark. string RECOMMENDED
<nick/> element The user's preferred roomnick for the chatroom. string OPTIONAL

Note: The datatypes are as defined in &w3xmlschema2;.

&namespace; Puck ]]>

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'.

Note that a bookmark item MUST contain only one conference room.

Note also that a conference element has no truly mandatory attributes or child elements, though a name SHOULD be given. Thus the following is legal:

&namespace; ]]>
]]> JC JC ]]>

Adding a bookmark means publishing a new item, with the bookmark JID as id, to the '&namespace;' node.

JC http://jabber.org/protocol/pubsub#publish-options true whitelist ]]> ]]>

Removing a bookmark means retracting an existing item, identified by the bookmark's JID, form the '&namespace;' node.

This implies that server support for the "delete-items" pubsub feature is REQUIRED.

]]> ]]>

When a client is sent an event from the Pubsub service for the '&namespace;' node, it MUST check the 'autojoin' attribute if present, and join the room immediately if the attribute is both present and true.

  • The conference element does not contain the jid - this is present only in the item id.
  • Each conference element is contained within an item.
  • The storage MUST be &xep0223;

&xep0060; is used for data storage, specifically through the use of private, personal pubsub nodes (described in &xep0223;) hosted at the user's virtual pubsub service (see &xep0163;).

A server MAY choose to unify the bookmarks from both &xep0049; based and the current &xep0048;.

When a client publishes a new item, the server MAY collate all items, casting them into the 'storage:bookmarks' namespace and setting the jid attribute to the item id in each case. When contained within a storage element qualified by the 'storage:bookmarks' namespace, this will be the correct format for both current and previous variants of &xep0048;

If a client publishes a replacement list of bookmarks via the older specifications, a server MAY examine the list and update the individual items as required, sending updates or retraction notifications as needed. Servers electing to perform this OPTIONAL behaviour SHOULD NOT send notifications for unchanged items.

This specification relies fully on a number of others. Most particularly, support for this protocol is available if &xep0223; is supported.

The authors would like to note that much of the syntax description was copied exactly from &xep0048; by Rachel Blackman, Peter Millard, and Peter Saint-Andre. Much of the remainder of this specification is based closely on their work.

Security considerations related to object persistence via publish-subscribe are described in XEP-0060 and XEP-0223.

The client needs to make sure that the server actually supports the "http://jabber.org/protocol/pubsub#publish-options" feature, before relying on it. If it's not supported, the client should configure the '&namespace;' node first (see xep-0060), before adding any bookmarks.