[standards-jig] disco, x:data, etc...

Alexey Shchepin alexey at sevcom.net
Sat Feb 15 13:37:47 UTC 2003


Hi!

When I implement online interface in ejabberd [1] to configure and monitor it,
I try to use modern things like disco, x:data and "statistics gathering"
(JEP-0039).  Also I try to make as less changes as possible in Tkabber to see
how generic this combination can be.

I show below example of how it works to better show problem:

Client requests disco items:
<iq id='3'
    to='e.localhost'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

Server sends disco items:
<iq from='e.localhost'
    to='test at e.localhost/tkabber'
    id='3'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item jid='echo.e.localhost'/>
    <item jid='vjud.e.localhost'/>
    <item jid='e.localhost'
          name='Configuration'
          node='config'/>
    ...
  </query>
</iq>

Client discoverings node "config":
<iq id='5'
    to='e.localhost'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#items'
         node='config'/>
</iq>

Server sends disco items in node "config":
<iq from='e.localhost'
    to='test at e.localhost/tkabber'
    id='5'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#items'
         node='config'>
    <item jid='e.localhost'
          name='Host Name'
          node='config/hostname'/>
    <item jid='e.localhost'
          name='ACLs'
          node='config/acls'/>
    <item jid='e.localhost'
          name='Access Rules'
          node='config/access'/>
    <item jid='e.localhost'
          name='Remove Users'
          node='config/remusers'/>
  </query>
</iq>

Client requests disco info in node "config/acls":
<iq id='8'
    to='e.localhost'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='config/acls'/>
</iq>

Server replies:
<iq from='e.localhost'
    to='test at e.localhost/tkabber'
    id='8'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'
         node='config/acls'>
    <feature var='jabber:x:data'/>
  </query>
</iq>

Client requests x:data form from "config/acls" node:
<iq id='9'
    to='e.localhost'
    type='get'>
  <query xmlns='jabber:x:data'
         node='config/acls'/>
</iq>

Server replies:
<iq from='e.localhost'
    to='test at e.localhost/tkabber'
    id='9'
    type='result'>
  <query xmlns='jabber:x:data'
         type='form'
         node='config/acls'>
    <title>ACLs Configuration</title>
    ...
  </query>
</iq>

You can see some screenshots of how this looks in Tkabber here: [2].

The problem is that "node" attribute inserted in "query" tag, and not only in
disco or in x:data namespaces, but in all other namespaces (e.g. in
http:/jabber.org/protocol/stats).  And JEP-0050 also use such convention.  This
works for IQ stanzas, but what to do if we will need to send message to node?
IMHO "node" attribute must be on the same level as "jid" attribute.  And we can
define that "jid" is an address of Jabber entity and that "node" is an address
inside this entity.  So we will have something like this:

<iq id='9'
    to='e.localhost'
    node='config/acls'
    type='get'>
  <query xmlns='jabber:x:data'/>
</iq>

Or we can define that node must be fourth element in a JID,
e.g. user at server/resource:node/subnode/subsubnode... and deny to use in
resource ":".

Any thoughts?

1. http://www.jabber.ru/projects/ejabberd/
2. http://www.jabber.ru/projects/ejabberd/guide.html




More information about the Standards mailing list