<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
  <header>
    <title>Portable Import/Export Format for XMPP Components</title>
    <abstract>This document specifies a file format for importing and exporting component data to and from XMPP software</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 IM</spec>
    </dependencies>
    <supersedes/>
    <supersededby/>
    <shortname>pie-components</shortname>
    
  <author>
    <firstname>Stephen Paul</firstname>
    <surname>Weber</surname>
    <email>singpolyma@singpolyma.net</email>
    <jid>singpolyma@singpolyma.net</jid>
  </author>

    <revision>
      <version>0.0.1</version>
      <date>2026-10-06</date>
      <initials>spw</initials>
      <remark><p>Initial version.</p></remark>
    </revision>
  </header>

<section1 topic="Introduction" anchor="intro">
  <p><span class="ref"><link url="https://xmpp.org/extensions/xep-0227.html">Portable Import/Export Format for XMPP-IM Servers (XEP-0227)</link></span> <note>XEP-0227: Portable Import/Export Format for XMPP-IM Servers &lt;<link url="https://xmpp.org/extensions/xep-0227.html">https://xmpp.org/extensions/xep-0227.html</link>&gt;.</note> introduced a format for the import/export of XMPP data. That specification specifically says "the contents of MUC, Pubsub, and other services are out of scope for this specification". This specification exists to cover that gap.</p>
</section1>

<section1 topic="File format" anchor="fileformat">
  <p>Inside the root element from <span class="ref"><link url="https://xmpp.org/extensions/xep-0227.html">Portable Import/Export Format for XMPP-IM Servers (XEP-0227)</link></span> <note>XEP-0227: Portable Import/Export Format for XMPP-IM Servers &lt;<link url="https://xmpp.org/extensions/xep-0227.html">https://xmpp.org/extensions/xep-0227.html</link>&gt;.</note> of <tt>&lt;server-data/&gt;</tt> qualified by the <tt>urn:xmpp:pie:0</tt> namespace, may occur zero or more <tt>&lt;component/&gt;</tt> elements qualified by the <tt>urn:xmpp:pie:0#component</tt> namespace. Each <tt>&lt;component/&gt;</tt> element describes a component, and has a <tt>jid</tt> attribute that contains its JID and a <tt>type</tt> attribute that describes the type of component.</p>

<example caption="The component element"><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='urn:xmpp:pie:0'>
  <component xmlns='urn:xmpp:pie:0#component' jid='groups.capulet.com' type='muc'>
    [ ... ]
  </component>
</server-data>
]]>
</example>

  <p>Components may contain children to describe any data relevant to the type of component. For example, a <tt>pubsub</tt> type component may have a <tt>&lt;pubsub xmlns="http://jabber.org/protocol/pubsub#owner"/&gt;</tt> child.</p>

  <p>A component may contain elements qualified by a namespace not mentioned in this specification or in <span class="ref"><link url="https://xmpp.org/extensions/xep-0227.html">Portable Import/Export Format for XMPP-IM Servers (XEP-0227)</link></span> <note>XEP-0227: Portable Import/Export Format for XMPP-IM Servers &lt;<link url="https://xmpp.org/extensions/xep-0227.html">https://xmpp.org/extensions/xep-0227.html</link>&gt;.</note>.  The exported data SHOULD be meaningful without the extensions.  An importing entity that encounters a namespace that it doesn't understand, or otherwise is unable to import all given data, SHOULD ignore the unknown data, SHOULD notify the operator, and MAY offer to terminate the process.</p>

  <section2 topic="Items" anchor="items">
    <p>A component may have associated items, represented by a <tt>&lt;item/&gt;</tt> element under the <tt>&lt;component/&gt;</tt> element.  The <tt>&lt;item/&gt;</tt> element MUST have a <tt>name</tt> attribute, which contains a type-specific identifier for this item.</p>

    <example caption="The item element"><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='urn:xmpp:pie:0'>
  <component xmlns='urn:xmpp:pie:0#component' jid='groups.capulet.com' type='muc'>
    <item name='discuss'>
      [ ... ]
    </item>
  </component>
</server-data>
]]></example>

    <p>Items may contain children to describe any data from items in the relevant type of component. For example a <tt>muc</tt> type component may have items with a <tt>&lt;archive xmlns="urn:xmpp:pie:0#mam"/&gt;</tt> child.</p>

    <p>An item may contain elements qualified by a namespace not mentioned in this specification or in <span class="ref"><link url="https://xmpp.org/extensions/xep-0227.html">Portable Import/Export Format for XMPP-IM Servers (XEP-0227)</link></span> <note>XEP-0227: Portable Import/Export Format for XMPP-IM Servers &lt;<link url="https://xmpp.org/extensions/xep-0227.html">https://xmpp.org/extensions/xep-0227.html</link>&gt;.</note>.  The exported data SHOULD be meaningful without the extensions.  An importing entity that encounters a namespace that it doesn't understand, or otherwise is unable to import all given data, SHOULD ignore the unknown data, SHOULD notify the operator, and MAY offer to terminate the process.</p>
  </section2>

</section1>

<section1 topic="Security Considerations" anchor="security">
  <p>Exported data files are to be handled with care, since they contain data that users expect to be protected. An exporting entity SHOULD make sure that the generated file is not accessible to unauthorized persons, e.g. by encrypting the file with <link url="https://www.rfc-editor.org/rfc/rfc9580.html">OpenPGP</link>.</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">
  <section2 topic="Protocol Namespaces" anchor="registrar-ns">
    <p>This specification defines the following XML namespace:</p>
    <ul>
      <li>urn:xmpp:pie:0#component</li>
    </ul>
    <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> includes the foregoing namespace in its registry at &lt;<link url="https://xmpp.org/registrar/namespaces.html">https://xmpp.org/registrar/namespaces.html</link>&gt;, as described in Section 4 of <span class="ref"><link url="https://xmpp.org/extensions/xep-0053.html">XMPP Registrar Function (XEP-0053)</link></span> <note>XEP-0053: XMPP Registrar Function &lt;<link url="https://xmpp.org/extensions/xep-0053.html">https://xmpp.org/extensions/xep-0053.html</link>&gt;.</note>.</p>
  </section2>
  <section2 topic="Component Types" anchor="registrar-type">
    <p>This specification creates a new registry for the component <tt>type</tt> attribute, with the following initial contents:</p>
    <ul>
      <li>muc</li>
      <li>pubsub</li>
    </ul>
  </section2>
</section1>

</xep>
