<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
  <header>
    <title>Pubsub Node Bookmark</title>
    <abstract>This specification defines a bookmark element pointing to a Pubsub node</abstract>
    
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>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.</permissions>
<warranty>## 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. ##</warranty>
<liability>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.</liability>
<conformance>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 &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
    <number>xxxx</number>
    <status>ProtoXEP</status>
    <type>Standards Track</type>
    <sig>Standards</sig>
    <approver>Council</approver>
    <dependencies>
      <spec>XMPP Core</spec>
      <spec>XEP-0001</spec>
      <spec>XEP-0163</spec>
      <spec>XEP-0060</spec>
    </dependencies>
    <supersedes/>
    <supersededby/>
    <shortname>NOT_YET_ASSIGNED</shortname>
    
  <author>
    <firstname>Timothée</firstname>
    <surname>Jaussoin</surname>
    <email>edhelas@movim.eu</email>
    <jid>edhelas@movim.eu</jid>
    <uri>https://edhelas.movim.eu</uri>
  </author>

    <revision>
      <version>0.0.1</version>
      <date>2025-09-19</date>
      <initials>psa</initials>
      <remark><p>First draft.</p></remark>
    </revision>
  </header>
<section1 topic="Introduction" anchor="intro">
    <p>This document defines an extensible bookmark element pointing to a Pubsub node, compatible with the extensions defined in <span class="ref"><link url="https://xmpp.org/extensions/xep-0402.html">PEP Native Bookmarks (XEP-0402)</link></span> <note>XEP-0402: PEP Native Bookmarks &lt;<link url="https://xmpp.org/extensions/xep-0402.html">https://xmpp.org/extensions/xep-0402.html</link>&gt;.</note>.</p>
    <p>This bookmarks elements are always listed as Pubsub items allowing an entity to discover and explore a list of bookmarks listed by another entity. For example in <span class="ref"><link url="https://xmpp.org/extensions/xep-0503.html">Server-side spaces (XEP-0503)</link></span><note>XEP-0503: Server-side spaces &lt;<link url="https://xmpp.org/extensions/xep-0503.html">https://xmpp.org/extensions/xep-0503.html</link>&gt;.</note> it allows a Space to list Pubsub nodes besides MUCs in a Space and in <span class="ref"><link url="https://xmpp.org/extensions/xep-0330.html">Pubsub Subscription (XEP-0330)</link></span> <note>XEP-0330: Pubsub Subscription &lt;<link url="https://xmpp.org/extensions/xep-0330.html">https://xmpp.org/extensions/xep-0330.html</link>&gt;.</note> it allows an entity to share Pubsub nodes it subscribed to.</p>
</section1>
<section1 topic="Protocol" anchor="protocol">
    <p>Information about a Pubsub Node Bookmark is provided by the entity. The bookmark container is defined as a classic &lt;pubsub-node/&gt; element, qualified by with theses specific constraints:</p>
    <table caption="attributes">
        <tr>
            <td><strong>Name</strong></td>
            <td><strong>Type</strong></td>
            <td><strong>Description</strong></td>
            <td><strong>Support</strong></td>
        </tr>
        <tr>
            <td>jid</td>
            <td>attribute</td>
            <td>The node jid address</td>
            <td>REQUIRED</td>
        </tr>
        <tr>
            <td>node</td>
            <td>attribute</td>
            <td>The node node</td>
            <td>REQUIRED</td>
        </tr>
        <tr>
            <td>&lt;extensions/&gt; element</td>
            <td>XML Elements</td>
            <td>A set of child elements (of potentially any namespace). Clients MUST preserve these (particularly preserving unknown elements) when editing items.</td>
            <td>OPTIONAL</td>
        </tr>
    </table>
    <section2 topic="Item ID">
        <p>The aim of this XEP is to allow an entity to handle a list of subscriptions. To simplify the managment of this list the ID of the <span class="ref"><link url="https://xmpp.org/extensions/xep-0060.html">Publish-Subscribe (XEP-0060)</link></span> <note>XEP-0060: Publish-Subscribe &lt;<link url="https://xmpp.org/extensions/xep-0060.html">https://xmpp.org/extensions/xep-0060.html</link>&gt;.</note> items MUST be the Pubsub URI of the node as defined in <span class="ref"><link url="https://xmpp.org/extensions/xep-0060.html">Publish-Subscribe (XEP-0060)</link></span> <note>XEP-0060: Publish-Subscribe &lt;<link url="https://xmpp.org/extensions/xep-0060.html">https://xmpp.org/extensions/xep-0060.html</link>&gt;.</note>#impl-uri without the 'xmpp:' part.</p>
    </section2>
</section1>
<section1 topic="Requirements" anchor="reqs">
    <p>The motivations for this document are to:</p>
    <ul>
        <li>Allow entities to list <span class="ref"><link url="https://xmpp.org/extensions/xep-0060.html">Publish-Subscribe (XEP-0060)</link></span> <note>XEP-0060: Publish-Subscribe &lt;<link url="https://xmpp.org/extensions/xep-0060.html">https://xmpp.org/extensions/xep-0060.html</link>&gt;.</note> Pubsub Nodes as Pubsub items</li>
        <li>Allow entities to discover <span class="ref"><link url="https://xmpp.org/extensions/xep-0060.html">Publish-Subscribe (XEP-0060)</link></span> <note>XEP-0060: Publish-Subscribe &lt;<link url="https://xmpp.org/extensions/xep-0060.html">https://xmpp.org/extensions/xep-0060.html</link>&gt;.</note> nodes using different scenarios, not defined here</li>
        <li>Allow those new Pubsub Node Bookmark items to be extensible</li>
    </ul>
</section1>
<section1 topic="Use Cases" anchor="usecases">
  <section2 topic="Discovering Pubsub Nodes Bookmarks" anchor="usecases">
    <example caption="Requests the list of bookmarks"><![CDATA[
<iq type='get'
    from='student@university.org'
    to='library.university.org'
    id='list-bookmarks'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='bookmarks-lists'/>
  </pubsub>
</iq>]]></example>
    <example caption="Server return the list of bookmarks"><![CDATA[
<iq type='result'
    from='library.university.org'
    to='student@university.org/cool-client'
    id='list-bookmarks'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='bookmarks-lists'>
      <item id='bookmarks.library.org?;node=books'>
        <pubsub-node xmlns="urn:xmpp:pubsub-node_bookmark:0"
                      jid="bookmarks.library.org"
                      node="books" />
      </item>
      <item id='bookmarks.library.org?;node=books'>
        <pubsub-node xmlns="urn:xmpp:pubsub-node_bookmark:0"
                      jid="bookmarks.library.org"
                      node="movies">
          <extensions>
            <pinned xmlns='urn:xmpp:bookmarks-pinning:0'/>
          </extensions>
        </pubsub-node>
      </item>
      <!-- other items -->
    </items>
  </pubsub>
</iq>
]]></example>
    </section2>
</section1>
<section1 topic="Security Considerations" anchor="security">
  <p>Related to the XEPs using this document.</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <p>The <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> is requested to issue an initial namespace of "urn:xmpp:pubsub:subscription".</p>
</section1>
<section1 topic="XML Schema" anchor="schema">
      <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace=']]>urn:xmpp:pubsub-node-bookmark:0<![CDATA['
    xmlns=']]>urn:xmpp:pubsub-node-bookmark:0<![CDATA['
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-xxxx: http://www.xmpp.org/inbox/pubsub-node-bookmark.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='pubsub-node'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='extensions' minOccurs='0' />
      </xs:sequence>
      <xs:attribute name='jid' type='xs:string' use='required'/>
      <xs:attribute name='node' type='xs:string' use='required'/>
    </xs:complexType>
  </xs:element>

  <xs:element name='extensions'>
    <xs:complexType>
      <xs:sequence>
        <xs:any namespace='##other'
                minOccurs='0'
                maxOccurs='unbounded'
                processContents='lax'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>]]></code>
    </section1>
</xep>
