XEP-0004: Clarify that <reported/> must appear first

It is important for form consuming entities which validate the form
field types that the <reported/> element appears before any <item/>
element in result forms. This is because the <reported/> element
contains the information about the field type of the fields. So if a
form has any <item/> before <reported/>, valididating entites would
need two passes to parse the form: the first pass to parse <reported/>
and the second one to parse the fields in <item/>s.

I consider this a non-breaking change, and just a clarification of the
XEP authors intention.
This commit is contained in:
Florian Schmaus 2021-01-27 18:55:20 +01:00 committed by Jonas Schäfer
parent df3d3d8b82
commit 9a0bafe030
1 changed files with 2 additions and 0 deletions

View File

@ -295,6 +295,8 @@
<li>One and only &lt;reported/&gt; element, which can be understood as a "table header" describing the data to follow.</li>
<li>Zero or more &lt;item/&gt; elements, which can be understood as "table cells" containing data (if any) that matches the request.</li>
</ol>
<p>The &lt;reported/&gt; element MUST appear before any
&lt;item/&gt; element in the XML document.</p>
<p>The syntax is as follows:</p>
<code><![CDATA[
<x xmlns='jabber:x:data'