[standards-jig] extending disco#info result

Richard Dobson richard at dobson-i.net
Wed Feb 25 16:45:00 UTC 2004


> First, allow me to apologize for not better annotating my example.

Sure.

> Here it is, including things that should have been there the first time:
>
> <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>

This does not seem to conform to the specs either according to my
understanding, also the 'result' type appears to be really intended for
search results and according to the examples seems it should be expressed as
follows:

<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>

Now this seems far more complicated than we really need it, what is so wrong
with my suggestion of:

<iq type='result'
    from='darkcave at macbeth.shakespeare.lit'
    to='hag66 at shakespeare.lit/pda'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity
        category='conference'
        type='text'
        name='A Dark Cave'/>
    <feature var='http://jabber.org/protocol/muc'/>
    <feature var='muc_temporary'/>
    <feature var='muc_unmoderated'/>
    <feature var='muc_nonanonymous'/>
    <prop var='muc_desc' name='Description'>The place for all good
witches!</prop>
    <prop var='muc_subject' name='Subject'>Fire Burn and Cauldron
Bubble</prop>
    <prop var='muc_occupants' name='Number of Occupants'>3</prop>
  </query>
</iq>

It seems to solve everyones problems and seems far more cleaner and simpler
and in-line with disco#info than using x:data seemingly for the sake of
doing so. It is just a simple extension to the disco spec, that also
provides the genericness that people want without the IMO unneccessary
complexity of using x:data when it isnt really necessary to do so, also IMO
the x:data bit looks quite ugly compared to the above.

Richard




More information about the Standards mailing list