<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
  <header>
    <title>Server-side spaces</title>
  <abstract>This document defines an XMPP protocol to cluster
    several groupchat rooms together.</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>0503</number>
  <status>Experimental</status>
  <type>Standards Track</type>
  <sig> Standards</sig>
  <approver>Council</approver>
  <dependencies>
      <spec>XMPP Core</spec>
      <spec>XMPP IM</spec>
    </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>spaces</shortname>
    
  <author>
    <firstname>Nicolas</firstname>
    <surname>Cedilnik</surname>
    <email>nicoco@nicoco.fr</email>
    <jid>nicoco@nicoco.fr</jid>
  </author>

    
  <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.3.0</version>
    <date>2026-05-03</date>
    <initials>nc</initials>
    <remark>
      <ul>
        <li>Fix pubsub node field name in room disco info.</li>
        <li>Specify how to attach images (avatar and banner) to a space.</li>
      </ul>
    </remark>
  </revision>
  <revision>
    <version>0.2.0</version>
    <date>2025-09-13</date>
    <initials>nc</initials>
    <remark><p>Rewrite using pubsub semantics.</p>
    </remark>
  </revision>
  <revision>
    <version>0.1.0</version>
    <date>2025-03-11</date>
    <initials>XEP Editor: dg</initials>
      <remark><p>Promoted to Experimental</p>
    </remark>
  </revision>
  <revision>
      <version>0.0.1</version>
      <date>2025-02-23</date>
      <initials>nc</initials>
      <remark><p>Initial version.</p></remark>
    </revision>
  </header>
  <section1 topic="Introduction" anchor="intro">
    <p>A single group chat room is not always enough.</p>
    <p>In various situations, one wishes to have several rooms (or even other entities) clustered together around a common
      theme. For instance, large open source software projects use different rooms for user support,
      development, announcements (examples: Slack's <em>
      workspaces</em>, Discord's <em>servers</em>, Mattermost's <em>teams</em>, WhatsApp's <em>
      communities</em>, Matrix's <em>spaces</em>). For the purpose of this document, let us call such group of entities under the umbrella term "spaces".</p>
    <p>This clustering is already possible by setting up a dedicated MUC Service (<span class="ref"><link url="https://xmpp.org/extensions/xep-0045.html">Multi-User Chat (XEP-0045)</link></span> <note>XEP-0045: Multi-User Chat &lt;<link url="https://xmpp.org/extensions/xep-0045.html">https://xmpp.org/extensions/xep-0045.html</link>&gt;.</note>)
      to group several rooms, but existing implementations of MUC service leave that option the administrators only.
      This specification proposes to use the semantics of <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> for spaces that:</p>
    <ul>
      <li>are groupchat protocol-independent;</li>
      <li>allow other types of entities than rooms (such as pubsub nodes);</li>
      <li>allow several spaces on a single pubsub service;</li>
      <li>allow entities to subscribe to updates of the space content;</li>
      <li>can be managed by users and not only administrators of a service.</li>
    </ul>
    <p>Since there are many subtle variations over the concept of <em>spaces</em>, this
      specification voluntarily <strong>does not cover</strong> access control, permissions,
      membership inside a <em> space</em> and its children entities. Similarly, it does not describe
      how a <em>space</em> holding entities hosted on several services in the federated XMPP
      network would work (but it does not forbid it). It aims at being a lowest common denominator
      for all sort of <em>spaces</em> to be built on.</p>
  </section1>
  <section1 topic="Terminology" anchor="terminology">
    <ul>
      <li>A <em>space</em> is a pubsub node (<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>) acting as the "parent" of several related rooms and other entities.</li>
      <li>A <em>spaces service</em> is a pubsub service that contains <em>spaces</em>, i.e.,
        it is the parent of multiple <em>spaces</em>.</li>
    </ul>
  </section1>
  <section1 topic="Node Configuration" anchor="node-config">
    <p>To be effectively usable as a space, a pubsub node must be configured in the way described by the following table below. We here introduce the notion of space <em>exposure</em>. A space can be <strong>public</strong>, meant to be joinable by anyone; or <strong>private</strong>, meant to be joined at the discretion of the node owner.</p>
    <table caption="Pubsub node configuration for any type of space">
      <tr>
        <th>field</th>
        <th>requirement</th>
        <th>value</th>
        <th>exposure</th>
      </tr>
      <tr>
        <td>pubsub#type</td>
        <td>MUST</td>
        <td>urn:xmpp:spaces:0</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#notify_retract</td>
        <td>MUST</td>
        <td>true</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#persist_items</td>
        <td>MUST</td>
        <td>true</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#purge_offline</td>
        <td>MUST</td>
        <td>false</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#notify_sub</td>
        <td>SHOULD</td>
        <td>true</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#notify_config</td>
        <td>SHOULD</td>
        <td>true</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#notify_delete</td>
        <td>SHOULD</td>
        <td>true</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#publish_model</td>
        <td>SHOULD NOT</td>
        <td>open</td>
        <td>any</td>
      </tr>
      <tr>
        <td>pubsub#access_model</td>
        <td>MUST</td>
        <td>open</td>
        <td>public</td>
      </tr>
      <tr>
        <td>pubsub#access_model</td>
        <td>MUST</td>
        <td>authorize or whitelist</td>
        <td>private</td>
      </tr>
    </table>
    <p>NB: this specification is made to be fully compatible with <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> without special server support. Ideally, additional functionality, yet to be described in subsequent specifications, would allow:</p>
    <ul>
      <li>To notify the subscribers of a space node of new subscriptions (and not just the owner). This is especially useful for private spaces.</li>
      <li>To ensure that a private space node is hidden from the list of nodes of a pubsub service, similar to the <tt>muc#roomconfig_publicroom</tt> configuration option for <span class="ref"><link url="https://xmpp.org/extensions/xep-0045.html">Multi-User Chat (XEP-0045)</link></span> <note>XEP-0045: Multi-User Chat &lt;<link url="https://xmpp.org/extensions/xep-0045.html">https://xmpp.org/extensions/xep-0045.html</link>&gt;.</note>.</li>
    </ul>
  </section1>
  <section1 topic="Discovering support" anchor="node-config">
    <p>In order to act as a space service, a pubsub service MUST implement and advertise in its <tt>disco#info</tt> (<span class="ref"><link url="https://xmpp.org/extensions/xep-0030.html">Service Discovery (XEP-0030)</link></span> <note>XEP-0030: Service Discovery &lt;<link url="https://xmpp.org/extensions/xep-0030.html">https://xmpp.org/extensions/xep-0030.html</link>&gt;.</note>) the following features described 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> (prepended by http://jabber.org/protocol/pubsub#):</p>
    <ul>
      <li>subscribe</li>
      <li>create-nodes</li>
      <li>delete-nodes</li>
      <li>config-node</li>
      <li>meta-data</li>
      <li>delete-items</li>
      <li>retract-items</li>
      <li>multi-items</li>
      <li>item-ids</li>
      <li>manage-subscriptions</li>
      <li>retrieve-items</li>
    </ul>
    <p>For better usability, it SHOULD also implement:</p>
    <ul>
      <li>member-affiliation</li>
      <li>modify-affiliations</li>
      <li>retrieve-affiliations</li>
      <li>get-pending</li>
    </ul>
  </section1>
  <section1 topic="Protocol" anchor="protocol">
    <section2 topic="Fetching spaces from a spaces service" anchor="list-spaces">
      <p>Fetching the list of <em>spaces</em> hosted on a <em>spaces service</em> is done via a <tt>
        disco#items</tt> (<span class="ref"><link url="https://xmpp.org/extensions/xep-0030.html">Service Discovery (XEP-0030)</link></span> <note>XEP-0030: Service Discovery &lt;<link url="https://xmpp.org/extensions/xep-0030.html">https://xmpp.org/extensions/xep-0030.html</link>&gt;.</note>) request directed at the pubsub service JID.
        If supported by the server and/or if the pubsub component holds pubsub nodes that are not spaces,
        <span class="ref"><link url="https://xmpp.org/extensions/xep-0462.html">PubSub Type Filtering (XEP-0462)</link></span> <note>XEP-0462: PubSub Type Filtering &lt;<link url="https://xmpp.org/extensions/xep-0462.html">https://xmpp.org/extensions/xep-0462.html</link>&gt;.</note> support might come in handy.</p>
      <example caption="Querying the list of spaces"><![CDATA[
<iq type='get'
    from='emacs-user@megacorp.example.com/cool-client'
    to='megacorp-pubsub.example.com'
    id='spaces-items'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <!-- Optional filter, if supported -->
    <filter xmlns='urn:xmpp:pubsub-filter:0'>
      <x xmlns='jabber:x:data' type='submit'>
        <field var='FORM_TYPE' type='hidden'>
          <value>urn:xmpp:pubsub-filter:0</value>
        </field>
        <field type='list-multi' var='included-types'>
          <value>urn:xmpp:spaces:0</value>
          <value/>
        </field>
      </x>
    </filter>
  </query>
</iq>
]]></example>
      <example caption="Space Service responds with the list of spaces it hosts"><![CDATA[
<iq type='result'
    to='emacs-user@megacorp.example.com/cool-client'
    from='megacorp-pubsub.example.com'
    id='spaces-items'>
  <item jid='megacorp-pubsub.example.com'
        node='dev'
        name='The developers corner'/>
  <item jid='megacorp-pubsub.example.com'
        node='sales'
        name='Sales team'/>
  <item jid='megacorp-pubsub.example.com'
        node='management'
        name='The bosses lounge'/>
</iq>
]]></example>
    </section2>
    <section2 topic="Fetching the metadata associated to a space" anchor="space-metadata">
      <p>Getting more information about a specific space relies on the standard pubsub mechanism to do so, i.e., a <tt>disco#info</tt> request directed at the space node.</p>
      <p>If the spaces service supports <span class="ref"><link url="https://xmpp.org/extensions/xep-0499.html">Pubsub Extended Discovery (XEP-0499)</link></span><note>XEP-0499: Pubsub Extended Discovery &lt;<link url="https://xmpp.org/extensions/xep-0499.html">https://xmpp.org/extensions/xep-0499.html</link>&gt;.</note> it could be used to reduce the number of roundtrips, by fetching metadata along with with the <tt>disco#items</tt> request of the previous section.</p>
      <example caption="Querying a space metadata"><![CDATA[
<iq type='get'
    from='emacs-user@megacorp.example.com/cool-client'
    to='megacorp-pubsub.example.com'
    id='space-metadata'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='dev'/>
</iq>
]]></example>
      <example caption="Space service responds with space metadata"><![CDATA[
<iq type='result'
    from='megacorp-pubsub.example.com'
    to='emacs-user@megacorp.example.com/cool-client'
    id='space-metadata'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='dev'>
    <identity category='pubsub' type='leaf'/>
    <feature var='http://jabber.org/protocol/pubsub'/>
    <x xmlns='jabber:x:data' type='result'>
      <field var='FORM_TYPE' type='hidden'>
        <value>http://jabber.org/protocol/pubsub#meta-data</value>
      </field>
      <field var='pubsub#type'>
        <value>urn:xmpp:spaces:0</value>
      </field>
      <field var='pubsub#creator' label='Node creator' type='jid-single'>
        <value>lead-dev@megacorp.example.com</value>
      </field>
      <field var='pubsub#title'>
        <value>The developers corner</value>
      </field>
      <field var='pubsub#owner' label='Node owners' type='jid-multi'>
        <value>lead-dev@megacorp.example.com</value>
        <value>lead-dev-friend@megacorp.example.com</value>
      </field>
      <!-- other fields of the pubsub#meta-data FORM_TYPE !-->
    </x>
  </query>
</iq>
]]></example>
    <section3 topic="Spaces images (avatar and banner)" anchor="space-images">
      <p>The standard <tt>pubsub#meta-data</tt> form does not specify a way to attach images to a pubsub node.
      To avoid requiring special support from a pubsub server, avatar and banner image(s)
      for a space can be declared as <link url="#space-content">items (content)</link> of the space pubsub node using standard <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> semantics.</p>
      <p>These items MUST use the dedicated "urn:xmpp:spaces:avatar:metadata:0" and "urn:xmpp:spaces:banner:metadata:0" identifiers.
      Their content is a <span class="ref"><link url="https://xmpp.org/extensions/xep-0084.html">User Avatar (XEP-0084)</link></span> <note>XEP-0084: User Avatar &lt;<link url="https://xmpp.org/extensions/xep-0084.html">https://xmpp.org/extensions/xep-0084.html</link>&gt;.</note> <tt>&lt;metadata&gt;</tt> element specifying where to download the images and their SHA1 hash.
      Implementations using <span class="ref"><link url="https://xmpp.org/extensions/xep-0363.html">HTTP File Upload (XEP-0363)</link></span> <note>XEP-0363: HTTP File Upload &lt;<link url="https://xmpp.org/extensions/xep-0363.html">https://xmpp.org/extensions/xep-0363.html</link>&gt;.</note> to upload these images SHOULD use the appropriate
      <link url="https://xmpp.org/extensions/xep-0363.html#purpose-permanent">permanent purpose</link>
      when uploading such images.</p>
      <p>The items MAY contain several metadata elements in case the images are available in different formats and/or resolutions.</p>
      <example caption="Getting the location of avatar and banner images for a space"><![CDATA[
<iq type='result'
    from='megacorp-pubsub.example.com'
    to='emacs-user@megacorp.example.com/cool-client'
    id='space-items'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='dev'>
      <!-- other items, such as rooms -->
      <item id="urn:xmpp:spaces:avatar:metadata:0">
        <metadata xmlns='urn:xmpp:avatar:metadata'>
          <info bytes='420'
                height='64'
                width='64'
                type='image/jpeg'
                url='https://permanent-uploads.megacorp.example.com/dev/avatar.jpg'
                id='sha1-of-dev.jpg' />
        </metadata>
        <metadata ... /> <!-- optional additional items for other resolutions or formats -->
      </item>
      <item id="urn:xmpp:spaces:banner:metadata:0" />
        <metadata xmlns='urn:xmpp:avatar:metadata'>
          <info bytes='4242'
                height='64'
                width='256'
                type='image/jpeg'
                url='https://permanent-uploads.megacorp.example.com/dev/banner.jpg'
                id='sha1-of-banner.jpg' />
        </metadata>
      </item>
    </items>
  </pubsub>
</iq>
]]></example>
    </section3>
    </section2>
    <section2 topic="Joining a space" anchor="join-space">
      <p>Joining a space is equivalent to subscribing to a pubsub node, as described 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>.
      If the pubsub service supports <span class="ref"><link url="https://xmpp.org/extensions/xep-0497.html">Pubsub Extended Subscriptions (XEP-0497)</link></span><note>XEP-0497: Pubsub Extended Subscriptions &lt;<link url="https://xmpp.org/extensions/xep-0497.html">https://xmpp.org/extensions/xep-0497.html</link>&gt;.</note>, clients SHOULD also subscribe to the metadata updates of this node.
      After a successful join, a client may decide to use <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> or <span class="ref"><link url="https://xmpp.org/extensions/xep-0465.html">Pubsub Public Subscriptions (XEP-0465)</link></span> <note>XEP-0465: Pubsub Public Subscriptions &lt;<link url="https://xmpp.org/extensions/xep-0465.html">https://xmpp.org/extensions/xep-0465.html</link>&gt;.</note> to advertise its subscriptions.</p>
    </section2>
    <section2 topic="Discovering the content of a space" anchor="space-content">
      <p>Discovering the children of a space uses the pubsub/items (<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>) query directed a the node. The items can represent different entities, wrapped in appropriate elements. Chat rooms SHOULD be wrapped 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>, which extensibility allows adding additional information that are useful for client to adapt their user interface, e.g. specifying that a given MUC is a <span class="ref"><link url="https://xmpp.org/extensions/xep-0272.html">Multiparty Jingle (XEP-0272)</link></span> <note>XEP-0272: Multiparty Jingle &lt;<link url="https://xmpp.org/extensions/xep-0272.html">https://xmpp.org/extensions/xep-0272.html</link>&gt;.</note>, or that its access is restricted to a specific subset of members of the space. Pubsub nodes SHOULD be wrapped 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> <tt>&lt;subscription&gt;</tt> elements. Other types of entities can be present and MUST be ignored by unsupporting clients.</p>
      <example caption="Querying space for its content"><![CDATA[
<iq type='get'
    from='emacs-user@megacorp.example.com/cool-client'
    to='megacorp-pubsub.example.com'
    id='space-items'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='dev' />
  </pubsub>
</iq>]]></example>
<example caption="Space service responds with space content"><![CDATA[
<iq type='result'
    from='megacorp-pubsub.example.com'
    to='emacs-user@megacorp.example.com/cool-client'
    id='space-items'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <items node='dev'>
      <item id='boring-software@conference.megacorp.example.com'>
        <conference xmlns='urn:xmpp:bookmarks:1'
                    name='ERP 3000'
                    autojoin='true' />
      </item>
      <item id='programming-socks@conference.megacorp.example.com'>
        <conference xmlns='urn:xmpp:bookmarks:1'
                    name='Share your best programming socks deal HERE'>
          <extensions>
            <pinned xmlns='urn:xmpp:bookmarks-pinning:0'/>
          </extensions>
        </conference>
      </item>
      <item id='editors@conference.megacorp.example.com'>
        <conference xmlns='urn:xmpp:bookmarks:1'
                    name='Settling the text editor wars'>
        </conference>
      </item>
      <item id='https://megacorp.example.com/dev-team-presentation'>
        <x xmlns='jabber:x:oob'>
          <url>https://megacorp.example.com/dev-team-presentation</url>
        </x>
      </item>
      <item id='some-hash'>
        <subscription xmlns="urn:xmpp:pubsub:subscription:0"
                      server="megacorp-pubsub.example.com"
                      node="dev-announcements" />
      </item>
      <!-- other items -->
    </items>
  </pubsub>
</iq>
]]></example>
    <p>According to <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>, all items of the space are returned, but <span class="ref"><link url="https://xmpp.org/extensions/xep-0496.html">Pubsub Node Relationships (XEP-0496)</link></span><note>XEP-0496: Pubsub Node Relationships &lt;<link url="https://xmpp.org/extensions/xep-0496.html">https://xmpp.org/extensions/xep-0496.html</link>&gt;.</note> could be used to define a more complex hierarchy of items, e.g., chat rooms restricted to the owners and not discoverable by other users.</p>
    </section2>
    <section2 topic="Advertising space membership" anchor="membership-advertising">
      <p>All entities that are part of a space SHOULD advertise their parent in their disco#info and the 'urn:xmpp:spaces:0' feature. This is useful if an entity wants to advertise the "official" space it is part of, and to help discoverability of related entities. To verify that an entity is effectively part of a space it advertises, the disco#items of the advertised node can be queried.</p>
      <p>To advertise their parent, entities SHOULD include a <span class="ref"><link url="https://xmpp.org/extensions/xep-0004.html">Data Forms (XEP-0004)</link></span> <note>XEP-0004: Data Forms &lt;<link url="https://xmpp.org/extensions/xep-0004.html">https://xmpp.org/extensions/xep-0004.html</link>&gt;.</note> of type urn:xmpp:spaces:0 with a <tt>parent</tt> field of type <tt>text-single</tt>.</p>
      <p>In the case of <span class="ref"><link url="https://xmpp.org/extensions/xep-0045.html">Multi-User Chat (XEP-0045)</link></span> <note>XEP-0045: Multi-User Chat &lt;<link url="https://xmpp.org/extensions/xep-0045.html">https://xmpp.org/extensions/xep-0045.html</link>&gt;.</note>, the <tt>muc#roomconfig_pubsub</tt> field SHOULD point to the space node IRI for backwards compatibility of this specification with existing MUC services implementations.</p>
      <example caption="Querying a MUC information"><![CDATA[
<iq from='emacs-user@megacorp.example.com/cool-client'
    to='programming-socks@conference.megacorp.example.com'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example><example caption="MUC reply, including its parent space"><![CDATA[
<iq from='programming-socks@conference.megacorp.example.com'
    to='emacs-user@megacorp.example.com/cool-client'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
  <!-- [...] -->
  <feature var='urn:xmpp:spaces:0'/>
  <x xmlns='jabber:x:data' type='result'>
    <field var='FORM_TYPE' type='hidden'>
      <value>urn:xmpp:spaces:0</value>
    </field>
    <field var='parent' label='Space parent''>
      <value>xmpp:megacorp-pubsub.example.com?;node=dev</value>
    </field>
  </x>
  <x xmlns='jabber:x:data' type='result'>
    <field var='FORM_TYPE' type='hidden'>
      <value>http://jabber.org/protocol/muc#roominfo</value>
    </field>
    <!-- ... -->
    <field var='muc#roomconfig_pubsub' label='Associated pubsub node'>
      <value>xmpp:megacorp-pubsub.example.com?;node=dev</value>
    </field>
  </x>
</query>
</iq>
]]></example>
    </section2>
  </section1>
  <section1 topic="XMPP Registrar Considerations" anchor="registrar">
    <section2 topic="Protocol Namespaces" anchor="registrar-ns">
      <p>New namespaces: "urn:xmpp:spaces:0", "urn:xmpp:spaces:avatar:metadata:0", "urn:xmpp:spaces:banner:metadata:0".</p>
    </section2>
  </section1>
  <section1 topic="Security considerations" anchor="security">
    <p>Security considerations are related to access control, and are out of scope of this document.</p>
  </section1>
  <section1 topic="XML Schema" anchor="schema">
    <p>No new schema is defined in this document.</p>
  </section1>
</xep>
