No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0315.xml 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Data Forms XML Element</title>
  10. <abstract>This specification defines an XMPP protocol extension for including XML-data in XEP-0004 data forms.</abstract>
  11. &LEGALNOTICE;
  12. <number>0315</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XEP-0004</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>media-element</shortname>
  23. <author>
  24. <firstname>Sergey</firstname>
  25. <surname>Dobrov</surname>
  26. <email>binary@jrudevels.org</email>
  27. <jid>binary@jrudevels.org</jid>
  28. <uri>http://jrudevels.org/</uri>
  29. </author>
  30. <revision>
  31. <version>0.1</version>
  32. <date>2012-10-15</date>
  33. <initials>psa</initials>
  34. <remark><p>Initial published version approved for publication by the XMPP Council.</p></remark>
  35. </revision>
  36. <revision>
  37. <version>0.0.2</version>
  38. <date>2012-06-21</date>
  39. <initials>snd</initials>
  40. <remark><p>Root element name changed to "wrapper"; xmlns fixed in the XML-schema.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>0.0.1</version>
  44. <date>2012-06-13</date>
  45. <initials>snd</initials>
  46. <remark><p>Initial version.</p></remark>
  47. </revision>
  48. </header>
  49. <section1 topic='Introduction' anchor='intro'>
  50. <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>
  51. </section1>
  52. <section1 topic='Media Element' anchor='media'>
  53. <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>
  54. <p>The &lt;wrapper/&gt; element SHOULD contain an XML-data which needs to be represented in a form.</p>
  55. <example caption='PubSub Blog Node Metadata'><![CDATA[
  56. <wrapper xmlns='urn:xmpp:xml-element'>
  57. <feed xmlns='http://www.w3.org/2005/Atom'>
  58. <title>Romeo&amp;apos;s Microblog</title>
  59. <id>tag:montague.lit,2008:home</id>
  60. <updated>2008-05-08T18:30:02Z</updated>
  61. <author>
  62. <name>Romeo Montague</name>
  63. <uri>xmpp:romeo@montague.lit</uri>
  64. </author>
  65. </feed>
  66. </wrapper>
  67. ]]></example>
  68. <example caption='Inclusion in Data Form'><![CDATA[
  69. <x xmlns='jabber:x:data' type='form'>
  70. [ ... ]
  71. <field var='xml-metadata' type='hidden'>
  72. <wrapper xmlns='urn:xmpp:xml-element'>
  73. <feed xmlns='http://www.w3.org/2005/Atom'>
  74. <title>Romeo&amp;apos;s Microblog</title>
  75. <id>tag:montague.lit,2008:home</id>
  76. <updated>2008-05-08T18:30:02Z</updated>
  77. <author>
  78. <name>Romeo Montague</name>
  79. <uri>xmpp:romeo@montague.lit</uri>
  80. </author>
  81. </feed>
  82. </wrapper>
  83. </field>
  84. [ ... ]
  85. </x>
  86. ]]></example>
  87. </section1>
  88. <section1 topic="Usage Practices">
  89. <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>
  90. <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>
  91. </section1>
  92. <section1 topic='IANA Considerations' anchor='iana'>
  93. <p>This document requires no interaction with &IANA;.</p>
  94. </section1>
  95. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  96. <section2 topic='Protocol Namespaces' anchor='ns'>
  97. <p>The &REGISTRAR; includes "urn:xmpp:xml-element" in its registry of protocol namespaces (see &NAMESPACES;).</p>
  98. </section2>
  99. </section1>
  100. <section1 topic='XML Schema' anchor='schema'>
  101. <code><![CDATA[
  102. <?xml version='1.0' encoding='UTF-8'?>
  103. <xs:schema
  104. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  105. targetNamespace='urn:xmpp:xml-element'
  106. xmlns='urn:xmpp:xml-element'
  107. elementFormDefault='qualified'>
  108. <xs:annotation>
  109. <xs:documentation>
  110. The protocol documented by this schema is defined in
  111. XEP-XXXX: http://www.xmpp.org/extensions/xep-xxxx.html
  112. </xs:documentation>
  113. </xs:annotation>
  114. <xs:element name='wrapper'>
  115. <xs:complexType>
  116. <xs:sequence>
  117. <xs:any minOccurs='0' maxOccurs='unbounded'/>
  118. </xs:sequence>
  119. </xs:complexType>
  120. </xs:element>
  121. </xs:schema>
  122. ]]></code>
  123. </section1>
  124. </xep>