[jdev] Reproducability of XEP-0115: Entity Capabilities - 5.3 Complex Generation Example

Yann Leboulanger asterix at lagaule.org
Thu Apr 24 05:04:38 CDT 2008

Peter Saint-Andre wrote:
> Yann Leboulanger wrote:
>> I have another question about this example:
>> how is it possible that the field ip_version which has no type (so
>> should be considered as text-single according to XEP-0004) can have
>> several <value> elements?
> Typically the field 'type' attribute is provided in data forms of type
> "form" only (so that the software presenting the form can show an
> appropriate interface) but not in forms of type "submit" or "result"
> (since the FORM_TYPE needs to specify the field types).

Indeed I re-read XEP-0004 and it says:
"For data forms of type "form", each <field/> element SHOULD possess a
'type' attribute that defines the data "type" of the field data (if no
'type' is specified, the default is "text-single"); fields provided in
the context of other forms types MAY possess a 'type' attribute as well."

So in this case how should a client do? It should remember from previous
forms that a form with FORM_TYPE=jabber:bot, the field features is of
type 'list-multi' to present the results ?

For example in XEP-0055 (Jabber Search) there is the <reported> tag that
tells the type of each fields.

More information about the JDev mailing list