1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00

1.0 DRAFT

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@4074 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2010-03-12 17:04:29 +00:00
parent 87799713db
commit c8aca67bc7

View File

@ -10,8 +10,7 @@
<abstract>This document specifies a file format for importing and exporting user data to and from XMPP-IM servers.</abstract> <abstract>This document specifies a file format for importing and exporting user data to and from XMPP-IM servers.</abstract>
&LEGALNOTICE; &LEGALNOTICE;
<number>0227</number> <number>0227</number>
<status>Proposed</status> <status>Draft</status>
<lastcall>2009-11-06</lastcall>
<type>Standards Track</type> <type>Standards Track</type>
<sig>Standards</sig> <sig>Standards</sig>
<approver>Council</approver> <approver>Council</approver>
@ -22,7 +21,10 @@
</dependencies> </dependencies>
<supersedes/> <supersedes/>
<supersededby/> <supersededby/>
<shortname>TO BE ASSIGNED</shortname> <shortname>pie</shortname>
<schemaloc>
<url>http://xmpp.org/schemas/pie.xsd</url>
</schemaloc>
<author> <author>
<firstname>Magnus</firstname> <firstname>Magnus</firstname>
<surname>Henoch</surname> <surname>Henoch</surname>
@ -35,6 +37,12 @@
<email>waqas20@gmail.com</email> <email>waqas20@gmail.com</email>
<jid>waqas@jaim.at</jid> <jid>waqas@jaim.at</jid>
</author> </author>
<revision>
<version>1.0</version>
<date>2010-03-12</date>
<initials>psa</initials>
<remark><p>Per a vote of the XMPP Council, advanced specification from Experimental to Draft; simultaneously the XMPP Registrar issued a namespace of "urn:xmpp:pie:0".</p></remark>
</revision>
<revision> <revision>
<version>0.3</version> <version>0.3</version>
<date>2009-10-16</date> <date>2009-10-16</date>
@ -100,11 +108,11 @@
</section1> </section1>
<section1 topic='File format' anchor='fileformat'> <section1 topic='File format' anchor='fileformat'>
<p>Data is contained in an XML document, whose root element is &lt;server-data/&gt; qualified by the 'http://www.xmpp.org/extensions/xep-0227.html#ns' namespace &NSNOTE;.</p> <p>Data is contained in an XML document, whose root element is &lt;server-data/&gt; qualified by the 'urn:xmpp:pie:0' namespace &NSNOTE;.</p>
<example caption='The root element'><![CDATA[ <example caption='The root element'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
[ ... ] [ ... ]
</server-data> </server-data>
]]> ]]>
@ -114,30 +122,30 @@
<p>At any point in the file, an exporting server may put an XInclude &lt;include/&gt; element; see <link url='#xinclude'>Use of XInclude</link>.</p> <p>At any point in the file, an exporting server may put an XInclude &lt;include/&gt; element; see <link url='#xinclude'>Use of XInclude</link>.</p>
<section2 topic='Hosts' anchor='hosts'> <section2 topic='Hosts' anchor='hosts'>
<p>The child elements of the &lt;server-data/&gt; elements are &lt;host/&gt; elements. Each &lt;host/&gt; element describes a virtual host, and has a 'jid' attribute that contains its JID.</p> <p>The child elements of the &lt;server-data/&gt; elements are &lt;host/&gt; elements. Each &lt;host/&gt; element describes a virtual host, and has a 'jid' attribute that contains its JID.</p>
<p>An importing server MAY automatically adjust its list of virtual hosts to fit the ones present in the data being imported. If it does not, it SHOULD notify the operator about any mismatch.</p> <p>An importing server MAY automatically adjust its list of virtual hosts to fit the ones present in the data being imported. If it does not, it SHOULD notify the operator about any mismatch.</p>
<example caption='The host element'><![CDATA[ <example caption='The host element'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='capulet.com'> <host jid='capulet.com'>
[ ... ] [ ... ]
</host> </host>
<host jid='montague.net'> <host jid='montague.net'>
[ ... ] [ ... ]
</host> </host>
</server-data> ]]> </server-data>
</example> ]]></example>
</section2> </section2>
<section2 topic='Users' anchor='users'> <section2 topic='Users' anchor='users'>
<p>Each user is represented by a &lt;user/&gt; element under the &lt;host/&gt; element. The &lt;user/&gt; element MUST have a 'name' attribute, which contains the node part of the user's JID, and SHOULD have a 'password' attribute, which contains the user's password.</p> <p>Each user is represented by a &lt;user/&gt; element under the &lt;host/&gt; element. The &lt;user/&gt; element MUST have a 'name' attribute, which contains the node part of the user's JID, and SHOULD have a 'password' attribute, which contains the user's password.</p>
<example caption='The user element'><![CDATA[ <example caption='The user element'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='capulet.com'> <host jid='capulet.com'>
<user name='juliet' password='s3crEt'> <user name='juliet' password='s3crEt'>
[ ... ] [ ... ]
@ -149,15 +157,15 @@
</user> </user>
</host> </host>
</server-data> ]]> </server-data> ]]>
</example> </example>
</section2> </section2>
<section2 topic='Rosters' anchor='rosters'> <section2 topic='Rosters' anchor='rosters'>
<p>Each &lt;user/&gt; element SHOULD contain the user's roster in the form of a &lt;query/&gt; element qualified by the 'jabber:iq:roster' namespace. This element contains the user's roster in the same format as when retrieving the roster from the server, as described in section 7.3 of &xmppim;.</p> <p>Each &lt;user/&gt; element SHOULD contain the user's roster in the form of a &lt;query/&gt; element qualified by the 'jabber:iq:roster' namespace. This element contains the user's roster in the same format as when retrieving the roster from the server, as described in section 7.3 of &xmppim;.</p>
<example caption='The roster'><![CDATA[ <example caption='The roster'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='capulet.com'> <host jid='capulet.com'>
<user name='juliet' password='s3crEt'> <user name='juliet' password='s3crEt'>
<query xmlns='jabber:iq:roster'> <query xmlns='jabber:iq:roster'>
@ -169,16 +177,16 @@
</query> </query>
</user> </user>
</host> </host>
</server-data> ]]> </server-data>
</example> ]]></example>
</section2> </section2>
<section2 topic='Offline Messages' anchor='offlinemessages'> <section2 topic='Offline Messages' anchor='offlinemessages'>
<p>If the exporting server stores messages received while the user was offline, it SHOULD include an &lt;offline-messages/&gt; element as a child of the &lt;user/&gt; element. This element contains all the stored messages to the user, if any, as &lt;message/&gt; elements qualified by the 'jabber:client' namespace, starting with the oldest.</p> <p>If the exporting server stores messages received while the user was offline, it SHOULD include an &lt;offline-messages/&gt; element as a child of the &lt;user/&gt; element. This element contains all the stored messages to the user, if any, as &lt;message/&gt; elements qualified by the 'jabber:client' namespace, starting with the oldest.</p>
<example caption='Offline messages'><![CDATA[ <example caption='Offline messages'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='capulet.com'> <host jid='capulet.com'>
<user name='juliet' password='s3crEt'> <user name='juliet' password='s3crEt'>
<offline-messages> <offline-messages>
@ -196,16 +204,16 @@
</offline-messages> </offline-messages>
</user> </user>
</host> </host>
</server-data> ]]> </server-data>
</example> ]]></example>
</section2> </section2>
<section2 topic='Private XML Storage' anchor='privatexmlstorage'> <section2 topic='Private XML Storage' anchor='privatexmlstorage'>
<p>Private data stored by the server as specified in &xep0049; is represented in this format by including a &lt;query/&gt; element qualified by the 'jabber:iq:private' namespace as a child of the &lt;user/&gt; element. This &lt;query/&gt; element in turn contains all elements saved in private XML storage.</p> <p>Private data stored by the server as specified in &xep0049; is represented in this format by including a &lt;query/&gt; element qualified by the 'jabber:iq:private' namespace as a child of the &lt;user/&gt; element. This &lt;query/&gt; element in turn contains all elements saved in private XML storage.</p>
<example caption='Private XML Storage'><![CDATA[ <example caption='Private XML Storage'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='shakespeare.lit'> <host jid='shakespeare.lit'>
<user name='hamlet' password='2b0Rnot2B'> <user name='hamlet' password='2b0Rnot2B'>
<query xmlns="jabber:iq:private"> <query xmlns="jabber:iq:private">
@ -215,16 +223,16 @@
</query> </query>
</user> </user>
</host> </host>
</server-data> ]]> </server-data>
</example> ]]></example>
</section2> </section2>
<section2 topic='vCards' anchor='vcards'> <section2 topic='vCards' anchor='vcards'>
<p>By &xep0054;, users can store vCards on the server. In this specification, vCards are child elements of the &lt;user/&gt; element, namely a &lt;vCard/&gt; element qualified by the 'vcard-temp' namespace.</p> <p>By &xep0054;, users can store vCards on the server. In this specification, vCards are child elements of the &lt;user/&gt; element, namely a &lt;vCard/&gt; element qualified by the 'vcard-temp' namespace.</p>
<example caption='vCards'><![CDATA[ <example caption='vCards'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='capulet.com'> <host jid='capulet.com'>
<user name='juliet' password='s3crEt'> <user name='juliet' password='s3crEt'>
<vCard xmlns='vcard-temp'> <vCard xmlns='vcard-temp'>
@ -232,16 +240,16 @@
</vCard> </vCard>
</user> </user>
</host> </host>
</server-data> ]]> </server-data>
</example> ]]></example>
</section2> </section2>
<section2 topic='Privacy Lists' anchor='privacy-lists'> <section2 topic='Privacy Lists' anchor='privacy-lists'>
<p>Privacy lists, as specified in &xep0016;, are represented in this format by including a &lt;query/&gt; element qualified by the 'jabber:iq:privacy' namespace as a child of the &lt;user/&gt; element. This element should contain all privacy lists associated with the user. A default privacy list, if set, is specified by including a &lt;default/&gt; element as a child of the &lt;query/&gt; element.</p> <p>Privacy lists, as specified in &xep0016;, are represented in this format by including a &lt;query/&gt; element qualified by the 'jabber:iq:privacy' namespace as a child of the &lt;user/&gt; element. This element should contain all privacy lists associated with the user. A default privacy list, if set, is specified by including a &lt;default/&gt; element as a child of the &lt;query/&gt; element.</p>
<example caption='Privacy lists'><![CDATA[ <example caption='Privacy lists'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='capulet.com'> <host jid='capulet.com'>
<user name='juliet' password='s3crEt'> <user name='juliet' password='s3crEt'>
<query xmlns='jabber:iq:privacy'> <query xmlns='jabber:iq:privacy'>
@ -263,16 +271,16 @@
</query> </query>
</user> </user>
</host> </host>
</server-data> ]]> </server-data>
</example> ]]></example>
</section2> </section2>
<section2 topic='Incoming Subscription Requests' anchor='incoming-subscription-requests'> <section2 topic='Incoming Subscription Requests' anchor='incoming-subscription-requests'>
<p>Each &lt;user/&gt; element SHOULD contain pending incoming subscription requests associated with the user's account. Incoming subscription requests are represented by including &lt;presence/&gt; elements qualified by the 'jabber:client' namespace with the 'type' attribute set to a value of 'subscribe' as children of the &lt;user/&gt; element.</p> <p>Each &lt;user/&gt; element SHOULD contain pending incoming subscription requests associated with the user's account. Incoming subscription requests are represented by including &lt;presence/&gt; elements qualified by the 'jabber:client' namespace with the 'type' attribute set to a value of 'subscribe' as children of the &lt;user/&gt; element.</p>
<example caption='Incoming subscription requests'><![CDATA[ <example caption='Incoming subscription requests'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns'> <server-data xmlns='urn:xmpp:pie:0'>
<host jid='capulet.com'> <host jid='capulet.com'>
<user name='juliet' password='s3crEt'> <user name='juliet' password='s3crEt'>
<presence xmlns='jabber:client' <presence xmlns='jabber:client'
@ -286,49 +294,46 @@
from='mercutio@montague.net'/> from='mercutio@montague.net'/>
</user> </user>
</host> </host>
</server-data> ]]> </server-data>
</example> ]]></example>
</section2> </section2>
</section1> </section1>
<section1 topic='Use of XInclude' anchor='xinclude'> <section1 topic='Use of XInclude' anchor='xinclude'>
<p>An exporting server may split the data in several files by using the XInclude &lt;include/&gt; element. An importing server MUST support &lt;include/&gt; elements having an 'href' attribute containing a relative URI, having no 'parse' attribute, and having no 'xpointer' attribute; it MAY support other kinds of &lt;include/&gt; elements. An exporting server SHOULD NOT include and an importing server SHOULD NOT process &lt;include/&gt; elements which are descendants, but not children of the &lt;user/&gt; element (since these may be part of user data).</p> <p>An exporting server may split the data in several files by using the XInclude &lt;include/&gt; element. An importing server MUST support &lt;include/&gt; elements having an 'href' attribute containing a relative URI, having no 'parse' attribute, and having no 'xpointer' attribute; it MAY support other kinds of &lt;include/&gt; elements. An exporting server SHOULD NOT include and an importing server SHOULD NOT process &lt;include/&gt; elements which are descendants, but not children of the &lt;user/&gt; element (since these may be part of user data).</p>
<section2 topic='File and Directory Layout' anchor='xinclude-layout'> <section2 topic='File and Directory Layout' anchor='xinclude-layout'>
<p>If an exporting server chooses to split the data into several files, it SHOULD use the following scheme:</p> <p>If an exporting server chooses to split the data into several files, it SHOULD use the following scheme:</p>
<p>The main file contains the &lt;server-data/&gt; element, which contains nothing but one &lt;include/&gt; element for each host. The file included for a certain host is placed in the same directory as the main file, and is named by appending ".xml" to the JID of the host, e.g. "capulet.com.xml".</p> <p>The main file contains the &lt;server-data/&gt; element, which contains nothing but one &lt;include/&gt; element for each host. The file included for a certain host is placed in the same directory as the main file, and is named by appending ".xml" to the JID of the host, e.g. "capulet.com.xml".</p>
<example caption='The main file, which includes host files'><![CDATA[ <example caption='The main file, which includes host files'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns' <server-data xmlns='urn:xmpp:pie:0'
xmlns:xi='http://www.w3.org/2001/XInclude'> xmlns:xi='http://www.w3.org/2001/XInclude'>
<xi:include href='capulet.com.xml'/> <xi:include href='capulet.com.xml'/>
<xi:include href='montague.net.xml'/> <xi:include href='montague.net.xml'/>
</server-data> </server-data>
]]> ]]></example>
</example>
<p>Each host file contains a &lt;host/&gt; element, which contains nothing but one &lt;include/&gt; element for each user of the host. The file included for a certain user is placed in a subdirectory whose name is the JID of the host, and is named by appending ".xml" to the node part of the user's JID, e.g. "capulet.com/juliet.xml".</p> <p>Each host file contains a &lt;host/&gt; element, which contains nothing but one &lt;include/&gt; element for each user of the host. The file included for a certain user is placed in a subdirectory whose name is the JID of the host, and is named by appending ".xml" to the node part of the user's JID, e.g. "capulet.com/juliet.xml".</p>
<example caption='The host file, which includes user files'><![CDATA[ <example caption='The host file, which includes user files'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<host xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns' <host xmlns='urn:xmpp:pie:0'
xmlns:xi='http://www.w3.org/2001/XInclude' xmlns:xi='http://www.w3.org/2001/XInclude'
jid='capulet.com'> jid='capulet.com'>
<xi:include href='capulet.com/juliet.xml'/> <xi:include href='capulet.com/juliet.xml'/>
<xi:include href='capulet.com/mercutio.xml'/> <xi:include href='capulet.com/mercutio.xml'/>
</host> </host>
]]> ]]></example>
</example>
<p>Each user file contains a &lt;user/&gt; element, and includes all data relating to that user.</p>
<p>Each user file contains a &lt;user/&gt; element, and includes all data relating to that user.</p> <example caption='The user file'><![CDATA[
<example caption='The user file'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<user xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns' <user xmlns='urn:xmpp:pie:0'
name='juliet' password='s3crEt'> name='juliet' password='s3crEt'>
<query xmlns='jabber:iq:roster'> <query xmlns='jabber:iq:roster'>
<item jid='romeo@montague.net' <item jid='romeo@montague.net'
@ -355,25 +360,33 @@
</offline-messages> </offline-messages>
</user> </user>
]]> ]]>
</example> </example>
<p>The definition of JIDs ensures that this generates valid file names on traditional Unix-like file systems, except for possible length constraints. However, various constraints may force an exporting server to alter this scheme. In any case, the importing server MUST NOT rely on this layout, but MUST do proper XInclude processing.</p> <p>The definition of JIDs ensures that this generates valid file names on traditional Unix-like file systems, except for possible length constraints. However, various constraints may force an exporting server to alter this scheme. In any case, the importing server MUST NOT rely on this layout, but MUST do proper XInclude processing.</p>
</section2>
</section2>
</section1> </section1>
<section1 topic='Security Considerations' anchor='security'> <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, in particular passwords. An exporting server SHOULD make sure that the generated file is not accessible to unauthorized persons, e.g. by enforcing strict file permissions.</p> <p>Exported data files are to be handled with care, since they contain data that users expect to be protected, in particular passwords. An exporting server SHOULD make sure that the generated file is not accessible to unauthorized persons, e.g. by enforcing strict file permissions.</p>
<p>XInclude &lt;include/&gt; elements which are indirect descendants of the &lt;user/&gt; element SHOULD be treated as opaque user data, and SHOULD NOT be processed.</p> <p>XInclude &lt;include/&gt; elements which are indirect descendants of the &lt;user/&gt; element SHOULD be treated as opaque user data, and SHOULD NOT be processed.</p>
</section1> </section1>
<section1 topic='IANA Considerations' anchor='iana'> <section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with the Internet Assigned Numbers Authority (IANA).</p> <p>This document requires no interaction with &IANA;.</p>
</section1> </section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'> <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'> <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0227.html#ns"; upon advancement of this specification, the &REGISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.</p> <p>This specification defines the following XML namespace:</p>
<ul>
<li>urn:xmpp:pie:0</li>
</ul>
<p>The &REGISTRAR; includes the foregoing namespace in its registry at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
</section2>
<section2 topic='Protocol Versioning' anchor='registrar-versioning'>
&NSVER;
</section2> </section2>
</section1> </section1>
@ -383,10 +396,17 @@
<xs:schema <xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://www.xmpp.org/extensions/xep-0227.html#ns' targetNamespace='urn:xmpp:pie:0'
xmlns='http://www.xmpp.org/extensions/xep-0227.html#ns' xmlns='urn:xmpp:pie:0'
elementFormDefault='qualified'> elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0227: http://xmpp.org/extensions/xep-0227.html
</xs:documentation>
</xs:annotation>
<xs:element name='server-data'> <xs:element name='server-data'>
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>