-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxep-0315.xml
141 lines (130 loc) · 4.87 KB
/
xep-0315.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Data Forms XML Element</title>
<abstract>This specification defines an XMPP protocol extension for including XML-data in XEP-0004 data forms.</abstract>
&LEGALNOTICE;
<number>0315</number>
<status>Deferred</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0004</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>xml-element</shortname>
<author>
<firstname>Sergey</firstname>
<surname>Dobrov</surname>
<email>binary@jrudevels.org</email>
<jid>binary@jrudevels.org</jid>
<uri>http://jrudevels.org/</uri>
</author>
<revision>
<version>0.1.1</version>
<date>2019-06-19</date>
<initials>fs</initials>
<remark><p>Fix shortname and section heading to avoid collision with XEP-0221</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2012-10-15</date>
<initials>psa</initials>
<remark><p>Initial published version approved for publication by the XMPP Council.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2012-06-21</date>
<initials>snd</initials>
<remark><p>Root element name changed to "wrapper"; xmlns fixed in the XML-schema.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2012-06-13</date>
<initials>snd</initials>
<remark><p>Initial version.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<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>
</section1>
<section1 topic='XML Element' anchor='xml-element'>
<p>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.</p>
<p>The <wrapper/> element SHOULD contain an XML-data which needs to be represented in a form.</p>
<example caption='PubSub Blog Node Metadata'><![CDATA[
<wrapper xmlns='urn:xmpp:xml-element'>
<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Romeo&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>
<example caption='Inclusion in Data Form'><![CDATA[
<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&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>
]]></example>
</section1>
<section1 topic="Usage Practices">
<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>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 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>The ®ISTRAR; includes "urn:xmpp:xml-element" in its registry of protocol namespaces (see &NAMESPACES;).</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?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>
]]></code>
</section1>
</xep>