XEP-0060: Add integer-or-max datatype to use with Data Forms Validation

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2020-09-24 19:16:48 +02:00 committed by Jonas Schäfer
parent ceff8b852c
commit b7fe8d8ebc
1 changed files with 43 additions and 0 deletions

View File

@ -49,6 +49,12 @@
<remark><p>Add integer-or-max datatype to use with Data Forms Validation.</p></remark>
@ -5911,6 +5917,29 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=subscribe;node=princely_musings
<section2 topic='Integration with Data Forms' anchor='usecase.xdata'>
<p>This section defines a datatype "integer-or-max" to be used with &xep0122;. An implementation may use this type to validate fields such as "pubsub#children_max", "pubsub#item_expire" or "pubsub#max_items".</p>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace="http://jabber.org/protocol/pubsub#integer-or-max">
<xs:simpleType name='integer-or-max'>
<xs:restriction base='integer'/>
<xs:restriction base='string'>
<xs:enumeration value='max'/>
<p>The meaning of a value of this type is defined in each field named above.</p>
<p>When the <link url='xep-0122.html#usecases-validation.range'>&lt;range/&gt; element</link> is used in combination with this datatype, it applies to the integer value.</p>
<section1 topic='Internationalization Considerations' anchor='i18n'>
@ -6658,6 +6687,20 @@ xmpp:pubsub.shakespeare.lit?pubsub;action=retrieve;node=princely_musings
<section2 topic='Data Forms Validation Datatypes' anchor='registrar.xdata-validate'>
<p>The following datatype shall be registered for use with Data Forms Validation:</p>
<code caption='Data Forms Validation Datatypes Registry Submission'><![CDATA[
Datatype used for text-single fields where the accepted value is
either an integer or the string "max".