%ents; ]>
PEP Native Bookmarks This specification defines a syntax and storage profile for keeping a list of chatroom bookmarks on the server. &LEGALNOTICE; 0402 Draft 2020-03-03 2020-02-12 Standards Track Standards Council XEP-0223 XEP-0411 bookmarks2 standards &dcridland; &jcbrand; 1.1.3 2021-12-27 egp

Add missing <supersedes/> for XEP-0411

1.1.2 2021-02-03 egp

Add fixed anchors to all sections

1.1.1 2020-06-02 mb

Fix missing minOccurs=0 in schema

1.1.0 2020-05-26 mb

Add schema + other editorial changes

1.0.0 2020-03-31 XEP Editor (jsc)

Advanced to Draft per Council vote from 2020-03-04.

0.4.0 2020-02-13 dwd
  • Remove sense of humour
  • Re-add Password field
  • Add metadata container
  • Show edit flow
0.3.0 2019-09-28 egp
  • Fix examples.
  • Explain the expected workflow better.
  • Encourage clients to set pubsub#send_last_published_item to never and pubsub#max_items to some high value.
  • Add examples about notifications and +notify.
  • Request clients to add notify='1' on retraction requests, so they do trigger notifications (see XEP-0060 §7.2.2.1 for a rationale).
  • Announce a feature when the server supports compat between old &xep0048; (version 1.0) and this specification, and another between current &xep0048; (version 1.1) and this specification.
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, which prevents safe atomic updates of individual bookmarks.

Finally, while some clients used custom XML elements to store additional private metadata about bookmarks, this was usually stripped when any bookmark was edited by another client.

This specification resolves all three 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.

This specification was originally entitled "Bookmarks 2: This Time It's Serious". Any implication of a sense of humour has been removed with the change in title.

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). While a client can typically assume a chatroom based on &xep0045;, clients are free to store chatrooms based on any particular groupchat protocol.

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, specified by the user. Clients SHOULD NOT attempt to autogenerate this from the JID. string OPTIONAL
<nick/> element The user's preferred roomnick for the chatroom, if different to that specified by &xep0172;. In the absence of this element being present, the nickname from &xep0172; SHOULD be used if present. string OPTIONAL
<password/> element A password used to access the chatroom. Note this is not intended to be a secure storage. string OPTIONAL
<extensions/> element A set of child elements (of potentially any namespace). Clients MUST preserve these (particularly preserving unknown elements) when editing items. XML Elements 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, thus the following is legal:

&namespace; ]]>

A client interested in bookmarks SHOULD include the '&namespace;+notify' feature in its &xep0115;, as per &xep0163;, so that it receives notifications for updates done by other clients of the user, and reacts accordingly. The actual notifications are explained in the Bookmark Notifications section of this specification.

]]>

Once connected, a client first retrieves the current list of bookmarks. It then SHOULD join every MUC identified by the items’ 'id' attribute that have an 'autojoin' attribute that is set to "true" or "1".

NOTE: A future version of this specification might refer to &xep0312; or a similar protocol to reduce the need for full synchronisation on each connection.

]]> JC JC ]]>

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

publish-options (as defined in XEP-0060) MUST be supported by the server in order to check that the node is correctly configured before publishing a new conference. This is especially important to avoid leaking your bookmarks to your contacts for instance.

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

Editing a bookmark means republishing the item, with the same bookmark JID as id, to the '&namespace;' node.

Note that clients MUST preserve any XML elements they do not understand, particularly including unknown elements, within the <extensions/> element of the bookmark.

publish-options (as defined in XEP-0060) MUST be supported by the server in order to check that the node is correctly configured before publishing a new conference. This is especially important to avoid leaking your bookmarks to your contacts for instance.

JC http://jabber.org/protocol/pubsub#publish-options true 10000 never 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.

A 'notify' attribute SHOULD be included on the <retract/> element in order to inform other online clients of the deletion.

]]> ]]>

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

JC ]]>

On the other hand, if the event is a retract notification, the client SHOULD leave the room immediately.

]]>
  • 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;.

It is encouraged to at least support unification between Private XML Storage because as of 2019 this is still the storage backend that is implemented in the majority of clients.

A server that supports unifying bookmarks from &xep0049; and &xep0402; SHOULD announce the "&namespace;#compat" feature on the account. Clients may use that feature as an indication that it is safe to store bookmarks using only &xep0402; without losing backward compatibility to clients that are only using &xep0049;.

A server that supports unifying bookmarks between &xep0223; and &xep0402; SHOULD announce the "&namespace;#compat-pep" feature on the account.

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.

Server side unification between &xep0049; bookmarks and PEP Native Bookmarks is announced with the feature "&namespace;#compat" on the account.

Server side unification between the current use of XEP-0048 bookmarks (PEP) is annouced with the feature "&namespace;#compat-pep" on the account.

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.

The protocol documented by this schema is defined in XEP-0402: http://www.xmpp.org/extensions/xep-0402.html ]]>