[jdev] Reproducability of XEP-0115: Entity Capabilities - 5.3 Complex Generation Example
stpeter at stpeter.im
Fri May 2 17:44:37 CDT 2008
On 04/24/2008 4:04 AM, Yann Leboulanger wrote:
> 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 ?
We assume that the client received a dataform of type "form" and then
submitted it (no need to include the types there because the entity
you're submitting to sent you the form in the first place), and yes I
think the client would need to remember the types it received in the
dataform of type "form" in order to properly parse the result. But we
could tighten up the spec on this score if that is desirable.
> For example in XEP-0055 (Jabber Search) there is the <reported> tag that
> tells the type of each fields.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
More information about the JDev