From d4ac2fe09f79bd08712c09bd5b2c20f30a400d28 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Thu, 13 Dec 2007 20:19:04 +0000 Subject: [PATCH] 0.2 git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1470 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0227.xml | 93 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 86 insertions(+), 7 deletions(-) diff --git a/xep-0227.xml b/xep-0227.xml index 81eeb3f7..734a96fc 100644 --- a/xep-0227.xml +++ b/xep-0227.xml @@ -28,6 +28,12 @@ henoch@dtek.chalmers.se legoscia@jabber.cd.chalmers.se + + 0.2 + 2007-12-13 + mh +

Use XInclude.

+
0.1 2007-08-08 @@ -49,14 +55,14 @@

The following constraints are imposed on this standard:

    -
  • -

    The data is stored in a single file.

    -

    For the convenience of server administrators, a single file holds all relevant data.

    -
  • The file format is XML-based.

    XMPP-IM servers already have tools to process XML data. This also allows extension of the format using namespaces. Furthermore, some of the data that needs to be stored is by definition already in XML form.

  • +
  • +

    The data layout is flexible.

    +

    The data is contained in a single XML document; however, it can be split into several files using &w3xinclude;.

    +
  • All user data is stored, but no server configuration data.

    User data has similar form throughout the XMPP world, but server configuration is implementation-specific. Therefore this specification does not attempt to transfer any aspects of the server configuration from one server to another.

    @@ -72,16 +78,16 @@
    • Exporting server.

      -

      The XMPP-IM server writing its user data into a file, following this specification.

      +

      The XMPP-IM server writing its user data to files, following this specification.

    • Importing server.

      -

      The XMPP-IM server reading data from such a file.

      +

      The XMPP-IM server reading data from such files.

    -

    Data is contained in a single XML file, whose root element is <server-data/> qualified by the 'http://www.xmpp.org/extensions/xep-0227.html#ns' namespace &NSNOTE;.

    +

    Data is contained in an XML document, whose root element is <server-data/> qualified by the 'http://www.xmpp.org/extensions/xep-0227.html#ns' namespace &NSNOTE;.

    @@ -93,6 +99,8 @@

    At any point in the file, an exporting server may put elements qualified by a namespace not mentioned in this specification. The exported data SHOULD be meaningful without the extensions. An importing server 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.

    +

    At any point in the file, an exporting server may put an XInclude <include/> element; see Use of XInclude.

    +

    The child elements of the <server-data/> elements are <host/> elements. Each <host/> element describes a virtual host, and has a 'jid' attribute that contains its JID.

    @@ -216,6 +224,77 @@
    + + +

    At any point in the file, an exporting server may put an XInclude <include/> element, to split the data into several files. An importing server MUST support <include/> elements having an 'href' attribute containing a relative URI, having no 'parse' attribute, and having no 'xpointer' attribute; it MAY support other kinds of <include/> elements.

    + + +

    If an exporting server chooses to split the data into several files, it SHOULD use the following scheme:

    + +

    The main file contains the <server-data/> element, which contains nothing but one <include/> 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".

    + + + + + + +]]> + + +

    Each host file contains a <host/> element, which contains nothing but one <include/> 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".

    + + + + + + +]]> + + + +

    Each user file contains a <user/> element, and includes all data relating to that user.

    + + + + + + Friends + + + + Juliet Capulet + + + + Neither, fair saint, if either thee dislike. + + Offline Storage + + + + +]]> + + +

    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.

    +
    + +
    +

    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.