mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-03 06:22:16 -05:00
[formtypes] Clarify FORM_TYPE field type on 'submit' type forms
Since 'submit' type forms are allowed to omitt the explicit declartion of the form field type, we must specify that the special FORM_TYPE field in 'submit' forms may not carry a type declartion. This just reflects what it is done in the wild anyways. Co-authored-by: Marvin W <git@larma.de>
This commit is contained in:
parent
b2e20eeefd
commit
f78938a44f
14
xep-0068.xml
14
xep-0068.xml
@ -23,6 +23,12 @@
|
|||||||
<registry/>
|
<registry/>
|
||||||
&hildjj;
|
&hildjj;
|
||||||
&stpeter;
|
&stpeter;
|
||||||
|
<revision>
|
||||||
|
<version>1.3.0</version>
|
||||||
|
<date>2020-05-05</date>
|
||||||
|
<initials>fs</initials>
|
||||||
|
<remark>Clarify field type handling of the FORM_TYPE field on submission forms.</remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>1.2</version>
|
<version>1.2</version>
|
||||||
<date>2012-05-28</date>
|
<date>2012-05-28</date>
|
||||||
@ -115,7 +121,7 @@
|
|||||||
|
|
||||||
<section1 topic='Use Cases' anchor='usecases'>
|
<section1 topic='Use Cases' anchor='usecases'>
|
||||||
<section2 topic='Unspecified Form' anchor='usecases-unspecified'>
|
<section2 topic='Unspecified Form' anchor='usecases-unspecified'>
|
||||||
<p>These are forms that do not have a hidden field of name FORM_TYPE.
|
<p>These are forms with type="form" or type="result" that do not have a hidden field of name FORM_TYPE or forms with type="submit" that do not have any field of name FORM_TYPE.
|
||||||
Existing processing rules still apply.</p>
|
Existing processing rules still apply.</p>
|
||||||
<example caption='Message with no FORM_TYPE'><![CDATA[
|
<example caption='Message with no FORM_TYPE'><![CDATA[
|
||||||
<message
|
<message
|
||||||
@ -171,7 +177,7 @@
|
|||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Incorrectly Specified FORM_TYPE' anchor='usecases-incorrect'>
|
<section2 topic='Incorrectly Specified FORM_TYPE' anchor='usecases-incorrect'>
|
||||||
|
|
||||||
<p>If the FORM_TYPE field is not hidden, it MUST be ignored as a context indicator.</p>
|
<p>If the FORM_TYPE field is not hidden in a form with type="form" or type="result", it MUST be ignored as a context indicator.</p>
|
||||||
|
|
||||||
<example caption='Message with bad FORM_TYPE'><![CDATA[
|
<example caption='Message with bad FORM_TYPE'><![CDATA[
|
||||||
<message to="juliet@capulet.com" from="romeo@montague.net/garden">
|
<message to="juliet@capulet.com" from="romeo@montague.net/garden">
|
||||||
@ -192,7 +198,7 @@
|
|||||||
]]></example>
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='IQ Example' anchor='usecases-IQ'>
|
<section2 topic='IQ Example' anchor='usecases-IQ'>
|
||||||
<p>The following example shows a user's interaction with a Multi-User Chat room in order to register with the room.</p>
|
<p>The following example shows a user's interaction with a Multi-User Chat room in order to register with the room. Note that as per &xep0004; the form field "type" attribute may be omitted in data forms of type "submit".</p>
|
||||||
<example caption='User Requests Registration Requirements'><![CDATA[
|
<example caption='User Requests Registration Requirements'><![CDATA[
|
||||||
<iq
|
<iq
|
||||||
from='hag66@shakespeare.lit/pda'
|
from='hag66@shakespeare.lit/pda'
|
||||||
@ -294,7 +300,7 @@
|
|||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Implementation Notes' anchor='impl'>
|
<section1 topic='Implementation Notes' anchor='impl'>
|
||||||
<p>If the FORM_TYPE field is not type="hidden", it does not have the special meaning defined herein.</p>
|
<p>If the FORM_TYPE field is not type="hidden" in a data form with type "form" or type "result", it does not have the special meaning defined herein. Data forms with the type "submit" are free to omit any explicit field type declaration (as per &xep0004; § 3.2), as the type is implied by the corresponding "form"-type data form. As consequence, implementations MUST treat a FORM_TYPE field without an explicit type attribute, in data forms of type "submit", as the FORM_TYPE field with the special meaning defined herein.</p>
|
||||||
<p>If the form is used in an IQ, the namespace of the <query/> element SHOULD match the base namespace of the FORM_TYPE. (One possible way of solving this problem would have been to reuse the <query/> tag from the IQ form of jabber:x:data within messages, but that would have meant that existing clients would not have been able to participate in these exchanges.)</p>
|
<p>If the form is used in an IQ, the namespace of the <query/> element SHOULD match the base namespace of the FORM_TYPE. (One possible way of solving this problem would have been to reuse the <query/> tag from the IQ form of jabber:x:data within messages, but that would have meant that existing clients would not have been able to participate in these exchanges.)</p>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user