[standards-jig] extending disco#info result

Richard Dobson richard at dobson-i.net
Thu Feb 26 15:36:39 UTC 2004


> I think Matt meant modified in the sense of textual clarification (you
> are not required to follow a form-submit-result sequence in x-data), not
> in the sense of protocol changes.

That would be good as all the examples that I scanned through showed that to
get x:data results you have to first have made an x:data request seemingly,
examples of using x:data as an extension in protocols would be useful.

Also to clarify things which one of us got the usage of x:data result
correct, as far as I can see this is the appropriate usage:

<x xmlns='jabber:x:data' type='result'>
  <title>MUC Room Properties</title>
  <reported>
    <field var='muc#room_desc' label='Description'/>
    <field var='muc#room_subj' label='Subject'/>
    <field var='muc#room_occupants' label='Number of Occupants'/>
  </reported>
  <item>
    <field var='muc#room_desc'><value>The place for all good
witches!</value></field>
    <field var='muc#room_subj'><value>The place for all good
witches!</value></field>
    <field var='muc#room_occupants'><value>3</value></field>
  </item>
</x>

But Matthew Miller seems to think this is the right way:

<x xmlns='jabber:x:data' type='result'>
  <field var='FORM_TYPE' type='hidden'>
    <value>http://jabber.org/protocol/muc#room</value>
  </field>
  <field var='muc#room_desc' label='Description'>
    <value>The place for all good witches!</value>
  </field>
  <field var='muc#room_subj' label='Subject'>
    <value>The place for all good witches!</value>
  </field>
  <field var='muc#room_occupants' label='Number of Occupants'>
    <value>3</value>
    <validate xmlns='http://jabber.org/protocol/xdata-validate'
datatype='xs:integer'/>
  </field>
</x>

Or are they both correct?

Richard




More information about the Standards mailing list