The original Bookmarks specification (Bookmark Storage (XEP-0048) ) used the widely available Private XML Storage (Private XML Storage (XEP-0049) ), 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 (Best Practices for Persistent Storage of Private Data via Publish-Subscribe (XEP-0223) ), 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 'urn:xmpp:bookmarks:0' node. Each item SHALL have, as item id, the Room JID of the chatroom (eg, firstname.lastname@example.org).
The payload of the item SHALL be a conference element qualified by the 'urn:xmpp:bookmarks:0' 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 ||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 XML Schema Part 2 .
This bookmark would be displayed as 'Council of Oberon' and, if activated, would attempt to join the conference room 'email@example.com' 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:
A client interested in bookmarks SHOULD include the 'urn:xmpp:bookmarks:0+notify' feature in its Entity Capabilities (XEP-0115) , as per Personal Eventing Protocol (XEP-0163) , 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".
Adding a bookmark means publishing a new item, with the bookmark JID as id, to the 'urn:xmpp:bookmarks:0' 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.
Removing a bookmark means retracting an existing item, identified by the bookmark's JID, form the 'urn:xmpp:bookmarks:0' 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 'urn:xmpp:bookmarks:0' node, it SHOULD join the room immediately if the 'autojoin' attribute is both present and true.
On the other hand, if the 'autojoin' attribute is absent or false, or when the event is a retract notification, the client SHOULD leave the room immediately.
Publish-Subscribe (XEP-0060)  is used for data storage, specifically through the use of private, personal pubsub nodes (described in Best Practices for Persistent Storage of Private Data via Publish-Subscribe (XEP-0223) ) hosted at the user's virtual pubsub service (see Personal Eventing Protocol (XEP-0163) ).
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 Private XML Storage (XEP-0049)  and Bookmarks 2 (This Time it's Serious) (XEP-0402)  SHOULD announce the "urn:xmpp:bookmarks:0#compat" feature on the account. Clients may use that feature as an indication that it is safe to store bookmarks using only Bookmarks 2 (This Time it's Serious) (XEP-0402)  without losing backward compatibility to clients that are only using Private XML Storage (XEP-0049) .
A server that supports unifying bookmarks between Best Practices for Persistent Storage of Private Data via Publish-Subscribe (XEP-0223)  and Bookmarks 2 (This Time it's Serious) (XEP-0402)  SHOULD announce the "urn:xmpp:bookmarks:0#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 Bookmark Storage (XEP-0048) 
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 Best Practices for Persistent Storage of Private Data via Publish-Subscribe (XEP-0223)  is supported.
Server side unification between Private XML Storage (XEP-0049)  bookmarks and Bookmarks 2 is announced with the feature "urn:xmpp:bookmarks:0#compat" on the account.
Server side unification between the current use of XEP-0048 bookmarks (PEP) is annouced with the feature "urn:xmpp:bookmarks:0#compat-pep" on the account.
The authors would like to note that much of the syntax description was copied exactly from Bookmark Storage (XEP-0048)  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 'urn:xmpp:bookmarks:0' node first (see xep-0060), before adding any bookmarks.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2018 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
There exists a special venue for discussion related to the technology described in this document: the <firstname.lastname@example.org> mailing list.
The primary venue for discussion of XMPP Extension Protocols is the <email@example.com> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <firstname.lastname@example.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
4. In accordance with Section 184.108.40.206 of XML Schema Part 2: Datatypes, the allowable lexical representations for the xs:boolean datatype are the strings "0" and "false" for the concept 'false' and the strings "1" and "true" for the concept 'true'; implementations MUST support both styles of lexical representation.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/