This commit is contained in:
Peter Saint-Andre 2012-10-15 10:32:50 -06:00
parent 9a57fe4389
commit d1f6a55582
1 changed files with 136 additions and 132 deletions

View File

@ -1,132 +1,136 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [ <!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'> <!ENTITY % ents SYSTEM 'xep.ent'>
%ents; %ents;
]> ]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?> <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep> <xep>
<header> <header>
<title>Data Forms XML Element</title> <title>Data Forms XML Element</title>
<abstract>This specification defines an XMPP protocol extension for including XML-data in XEP-0004 data forms.</abstract> <abstract>This specification defines an XMPP protocol extension for including XML-data in XEP-0004 data forms.</abstract>
&LEGALNOTICE; &LEGALNOTICE;
<number>xxxx</number> <number>0315</number>
<status>Experimental</status> <status>Experimental</status>
<type>Standards Track</type> <type>Standards Track</type>
<sig>Standards</sig> <sig>Standards</sig>
<dependencies> <dependencies>
<spec>XMPP Core</spec> <spec>XMPP Core</spec>
<spec>XEP-0004</spec> <spec>XEP-0004</spec>
</dependencies> </dependencies>
<supersedes>None</supersedes> <supersedes>None</supersedes>
<supersededby>None</supersededby> <supersededby>None</supersededby>
<shortname>media-element</shortname> <shortname>media-element</shortname>
<schemaloc> <schemaloc/>
<url>http://www.xmpp.org/schemas/xml-element.xsd</url> <author>
</schemaloc> <firstname>Sergey</firstname>
<author> <surname>Dobrov</surname>
<firstname>Sergey</firstname> <email>binary@jrudevels.org</email>
<surname>Dobrov</surname> <jid>binary@jrudevels.org</jid>
<email>binary@jrudevels.org</email> <uri>http://jrudevels.org/</uri>
<jid>binary@jrudevels.org</jid> </author>
<uri>http://jrudevels.org/</uri> <revision>
</author> <version>0.1</version>
<revision> <date>2012-10-15</date>
<version>0.0.2</version> <initials>psa</initials>
<date>2012-06-21</date> <remark><p>Initial published version approved for publication by the XMPP Council.</p></remark>
<initials>snd</initials> </revision>
<remark><p>Root element name changed to "wrapper"; xmlns fixed in the XML-schema.</p></remark> <revision>
</revision> <version>0.0.2</version>
<revision> <date>2012-06-21</date>
<version>0.0.1</version> <initials>snd</initials>
<date>2012-06-13</date> <remark><p>Root element name changed to "wrapper"; xmlns fixed in the XML-schema.</p></remark>
<initials>snd</initials> </revision>
<remark><p>Initial version.</p></remark> <revision>
</revision> <version>0.0.1</version>
</header> <date>2012-06-13</date>
<initials>snd</initials>
<section1 topic='Introduction' anchor='intro'> <remark><p>Initial version.</p></remark>
<p>In certain protocols that make use of &xep0004;, 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.</p> </revision>
</section1> </header>
<section1 topic='Media Element' anchor='media'> <section1 topic='Introduction' anchor='intro'>
<p>The root element for XML-data is &lt;wrapper/&gt;. This element MUST be qualified by the "urn:xmpp:xml-element" namespace. The &lt;wrapper/&gt; element MUST be contained within a &lt;field/&gt; element qualified by the 'jabber:x:data' namespace.</p> <p>In certain protocols that make use of &xep0004;, 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.</p>
<p>The &lt;wrapper/&gt; element SHOULD contain an XML-data which needs to be represented in a form.</p> </section1>
<example caption='PubSub Blog Node Metadata'><![CDATA[
<wrapper xmlns='urn:xmpp:xml-element'> <section1 topic='Media Element' anchor='media'>
<feed xmlns='http://www.w3.org/2005/Atom'> <p>The root element for XML-data is &lt;wrapper/&gt;. This element MUST be qualified by the "urn:xmpp:xml-element" namespace. The &lt;wrapper/&gt; element MUST be contained within a &lt;field/&gt; element qualified by the 'jabber:x:data' namespace.</p>
<title>Romeo&amp;apos;s Microblog</title> <p>The &lt;wrapper/&gt; element SHOULD contain an XML-data which needs to be represented in a form.</p>
<id>tag:montague.lit,2008:home</id> <example caption='PubSub Blog Node Metadata'><![CDATA[
<updated>2008-05-08T18:30:02Z</updated> <wrapper xmlns='urn:xmpp:xml-element'>
<author> <feed xmlns='http://www.w3.org/2005/Atom'>
<name>Romeo Montague</name> <title>Romeo&amp;apos;s Microblog</title>
<uri>xmpp:romeo@montague.lit</uri> <id>tag:montague.lit,2008:home</id>
</author> <updated>2008-05-08T18:30:02Z</updated>
</feed> <author>
</wrapper> <name>Romeo Montague</name>
]]></example> <uri>xmpp:romeo@montague.lit</uri>
<example caption='Inclusion in Data Form'><![CDATA[ </author>
<x xmlns='jabber:x:data' type='form'> </feed>
[ ... ] </wrapper>
<field var='xml-metadata' type='hidden'> ]]></example>
<wrapper xmlns='urn:xmpp:xml-element'> <example caption='Inclusion in Data Form'><![CDATA[
<feed xmlns='http://www.w3.org/2005/Atom'> <x xmlns='jabber:x:data' type='form'>
<title>Romeo&amp;apos;s Microblog</title> [ ... ]
<id>tag:montague.lit,2008:home</id> <field var='xml-metadata' type='hidden'>
<updated>2008-05-08T18:30:02Z</updated> <wrapper xmlns='urn:xmpp:xml-element'>
<author> <feed xmlns='http://www.w3.org/2005/Atom'>
<name>Romeo Montague</name> <title>Romeo&amp;apos;s Microblog</title>
<uri>xmpp:romeo@montague.lit</uri> <id>tag:montague.lit,2008:home</id>
</author> <updated>2008-05-08T18:30:02Z</updated>
</feed> <author>
</wrapper> <name>Romeo Montague</name>
</field> <uri>xmpp:romeo@montague.lit</uri>
[ ... ] </author>
</x> </feed>
]]></example> </wrapper>
</section1> </field>
[ ... ]
<section1 topic="Usage Practices"> </x>
<p>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.</p> ]]></example>
<p>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.</p> </section1>
</section1>
<section1 topic="Usage Practices">
<section1 topic='IANA Considerations' anchor='iana'> <p>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.</p>
<p>This document requires no interaction with &IANA;.</p> <p>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.</p>
</section1> </section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'> <section1 topic='IANA Considerations' anchor='iana'>
<section2 topic='Protocol Namespaces' anchor='ns'> <p>This document requires no interaction with &IANA;.</p>
<p>The &REGISTRAR; includes "urn:xmpp:xml-element" in its registry of protocol namespaces (see &NAMESPACES;).</p> </section1>
</section2>
</section1> <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'>
<section1 topic='XML Schema' anchor='schema'> <p>The &REGISTRAR; includes "urn:xmpp:xml-element" in its registry of protocol namespaces (see &NAMESPACES;).</p>
<code><![CDATA[ </section2>
<?xml version='1.0' encoding='UTF-8'?> </section1>
<xs:schema <section1 topic='XML Schema' anchor='schema'>
xmlns:xs='http://www.w3.org/2001/XMLSchema' <code><![CDATA[
targetNamespace='urn:xmpp:xml-element' <?xml version='1.0' encoding='UTF-8'?>
xmlns='urn:xmpp:xml-element'
elementFormDefault='qualified'> <xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
<xs:annotation> targetNamespace='urn:xmpp:xml-element'
<xs:documentation> xmlns='urn:xmpp:xml-element'
The protocol documented by this schema is defined in elementFormDefault='qualified'>
XEP-XXXX: http://www.xmpp.org/extensions/xep-xxxx.html
</xs:documentation> <xs:annotation>
</xs:annotation> <xs:documentation>
The protocol documented by this schema is defined in
<xs:element name='wrapper'> XEP-XXXX: http://www.xmpp.org/extensions/xep-xxxx.html
<xs:complexType> </xs:documentation>
<xs:sequence> </xs:annotation>
<xs:any minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence> <xs:element name='wrapper'>
</xs:complexType> <xs:complexType>
</xs:element> <xs:sequence>
<xs:any minOccurs='0' maxOccurs='unbounded'/>
</xs:schema> </xs:sequence>
]]></code> </xs:complexType>
</section1> </xs:element>
</xep> </xs:schema>
]]></code>
</section1>
</xep>