[Standards-JIG] Ad-hoc Commands and nesting

Trejkaz trejkaz at trypticon.org
Sun Jan 16 21:04:48 UTC 2005


Ripped out of JEP-50:

> Example 3. Disco request for items
> 
> <iq type='get' from='requester at domain' to='responder at domain'>
>   <query xmlns='http://jabber.org/protocol/disco#items'
>          node='http://jabber.org/protocol/commands'/>
> </iq>
>     
> 
> Example 4. Disco result for items
> 
> <iq type='result' to='requester at domain' from='responder at domain'>
>   <query xmlns='http://jabber.org/protocol/disco#items'
>          node='http://jabber.org/protocol/commands'>
>     <item jid='responder at domain' node='list'
>           name='List Service Configurations'/>
[...]
>     <item jid='responder at domain' node='restart'
>           name='Restart Service'/>
>   </query>
> </iq>

What I'd like to know is...

In the case of a server, there may be hundreds of administrative commands 
available.  Obviously you can put them all in one gigantic list, but 
selecting from a drop-down box of even a dozen commands feels painful 
already.

Wouldn't it be possible to nest the command lists?

| <iq type='get' from='requester at domain' to='responder at domain'>
|   <query xmlns='http://jabber.org/protocol/disco#items'
|          node='http://jabber.org/protocol/commands'/>
| </iq>
| <iq type='result' to='requester at domain' from='responder at domain'>
|   <query xmlns='http://jabber.org/protocol/disco#items'
|          node='http://jabber.org/protocol/commands'>
|     <item jid='responder at domain' node='cat-1'
|           name='Command Category 1'/>
|     <item jid='responder at domain' node='cat-2'
|           name='Command Category 2'/>
|   </query>
| </iq>

And how does a client know they're command lists and not commands?  Easy:

| <iq type='get' from='requester at domain' to='responder at domain'>
|   <query xmlns='http://jabber.org/protocol/disco#info'
|          node='cat-1'/>
| </iq>
| <iq type='result to='requester at domain' from='responder at domain'>
|   <query xmlns='http://jabber.org/protocol/disco#info'
|          node='config'>
|     <identity name='Category 1'
|               category='automation' type='command-list'/>
|   </query>
| </iq>

The service said it was a list of commands, so we should do a disco#items 
again, and so on and so on.  This can be relatively easily implemented as 
either a set of drop-down boxes or a cascading menu.  Or, it can be easily 
accessed via a service discovery screen such as Psi's.

Any comments?

TX

-- 
             Email: Trejkaz Xaoza <trejkaz at trypticon.org>
          Web site: http://xaoza.net/
         Jabber ID: trejkaz at jabber.zim.net.au
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20050117/9ba5dbd9/attachment.sig>


More information about the Standards mailing list