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

Ralph Meijer jabber.org at ralphm.ik.nu
Tue May 6 02:33:14 CDT 2008


On Tue, 2008-05-06 at 00:35 +0200, Yann Leboulanger wrote:
> Peter Saint-Andre wrote:
> > 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.
> 
> That's not always True. For example in XEP-0128, we get a result form 
> without having previously requested anything, so we have no way to know 
> which type of field it is.
> 
> This is a problem currently in Gajim as our DataForm parser accept 
> several values element only in list-multi. So it doesn't parse correclty 
> dataforms from XEP-0128. So we can't compute correclty caps hash (it 
> contains those values)
> 
> But I'm not sure it's a good thing to guess field type from the number 
> of values elements in it ...

You can know the types of the fields because of the scoping by the
FORM_TYPE field. Yes, this would require you knowing about the fields
you can expect, but you need that for further processing anyway.

You don't need to know about the types for hash calculations, since this
is not the place to actually validate the form. It only needs to be
well-formed and adhere to the Data Forms schema.

-- 
Groetjes,

ralphm




More information about the JDev mailing list