XEP-xxxx: Data Forms XML Element

Abstract:This specification defines an XMPP protocol extension for including XML-data in XEP-0004 data forms.
Author:Sergey Dobrov
Copyright:© 1999 - 2012 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:Experimental
Type:Standards Track
Version:0.0.2
Last Updated:2012-06-21

WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.


Table of Contents


1. Introduction
2. Media Element
3. Usage Practices
4. IANA Considerations
5. XMPP Registrar Considerations
    5.1. Protocol Namespaces
6. XML Schema

Appendices
    A: Document Information
    B: Author Information
    C: Legal Notices
    D: Relation to XMPP
    E: Discussion Venue
    F: Requirements Conformance
    G: Notes
    H: Revision History


1. Introduction

In certain protocols that make use of Data Forms [1], it can be helpful to include XML-data (for example, when we want to insert a big amount of structured data which is hard to insert as a separate fields). This document defines a method for including XML-data in a data form.

2. Media Element

The root element for XML-data is <wrapper/>. This element MUST be qualified by the "urn:xmpp:xml-element" namespace. The <wrapper/> element MUST be contained within a <field/> element qualified by the 'jabber:x:data' namespace.

The <wrapper/> element SHOULD contain an XML-data which needs to be represented in a form.

Example 1. PubSub Blog Node Metadata

<wrapper xmlns='urn:xmpp:xml-element'>
  <feed xmlns='http://www.w3.org/2005/Atom'>
    <title>Romeo&amp;apos;s Microblog</title>
    <id>tag:montague.lit,2008:home</id>
    <updated>2008-05-08T18:30:02Z</updated>
    <author>
      <name>Romeo Montague</name>
      <uri>xmpp:romeo@montague.lit</uri>
    </author>
  </feed>
</wrapper>
  

Example 2. Inclusion in Data Form

<x xmlns='jabber:x:data' type='form'>
  [ ... ]
  <field var='xml-metadata' type='hidden'>
    <wrapper xmlns='urn:xmpp:xml-element'>
      <feed xmlns='http://www.w3.org/2005/Atom'>
        <title>Romeo&amp;apos;s Microblog</title>
        <id>tag:montague.lit,2008:home</id>
        <updated>2008-05-08T18:30:02Z</updated>
        <author>
          <name>Romeo Montague</name>
          <uri>xmpp:romeo@montague.lit</uri>
        </author>
      </feed>
    </wrapper>
  </field>
  [ ... ]
</x>
  

3. Usage Practices

XML-data is usually hard for manual editing and SHOULD be used only for machine level iteractions. So it's RECOMMENDED to include it in the form as a "hidden" field.

However, there are situations when human editing of XML-data may be useful (for example, to see XML-logs of some XMPP-service). In that case it's RECOMMENDED for a client to represent this XML in a pretty formatted form and give an instruments to make it easier to edit XML-data.

4. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [2].

5. XMPP Registrar Considerations

5.1 Protocol Namespaces

The XMPP Registrar [3] includes "urn:xmpp:xml-element" in its registry of protocol namespaces (see <http://xmpp.org/registrar/namespaces.html>).

6. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:xml-element'
    xmlns='urn:xmpp:xml-element'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-XXXX: http://www.xmpp.org/extensions/xep-xxxx.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='wrapper'>
    <xs:complexType>
      <xs:sequence>
        <xs:any minOccurs='0' maxOccurs='unbounded'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
  

Appendices


Appendix A: Document Information

Series: XEP
Number: xxxx
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.0.2
Last Updated: 2012-06-21
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0004
Supersedes: None
Superseded By: None
Short Name: media-element
Schema: <http://www.xmpp.org/schemas/xml-element.xsd>
Source Control: HTML
This document in other formats: XML  PDF


Appendix B: Author Information

Sergey Dobrov

Email: binary@jrudevels.org
JabberID: binary@jrudevels.org
URI: http://jrudevels.org/


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 - 2012 by the XMPP Standards Foundation (XSF).

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.

Disclaimer of 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. ##

Limitation of 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.

IPR 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 <http://xmpp.org/about-xmpp/xsf/xsf-ipr-policy/> or obtained by writing to XMPP Standards Foundation, 1899 Wynkoop Street, Suite 600, Denver, CO 80202 USA).

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.


Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

Errata can be sent to <editor@xmpp.org>.


Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".


Appendix G: Notes

1. XEP-0004: Data Forms <http://xmpp.org/extensions/xep-0004.html>.

2. 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 <http://www.iana.org/>.

3. 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 <http://xmpp.org/registrar/>.


Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

Version 0.0.2 (2012-06-21)

Root element name changed to "wrapper"; xmlns fixed in the XML-schema.

(snd)

Version 0.0.1 (2012-06-13)

Initial version.

(snd)

END