Hi!

Looking at section 5.5 of XEP-0060
(http://www.xmpp.org/extensions/xep-0060.html#entity-discoveritems) I
see that disco#items query is used for retrieving published items
list.

However, published items are very different from disco#items. If a
naive client attempts to interpret published item as an ordinary disco
item it will succeed but the result will be quite strange.

Example:

<iq id='21' to='[EMAIL PROTECTED]' type='get' xml:lang='en'>
      <query xmlns='http://jabber.org/protocol/disco#items'
        node='http://jabber.org/protocol/mood'/>
</iq>

<iq from='[EMAIL PROTECTED]' id='21' type='result' to='[EMAIL 
PROTECTED]/resource'>
      <query node='http://jabber.org/protocol/mood'
        xmlns='http://jabber.org/protocol/disco#items'>
            <item name='mood1' jid='[EMAIL PROTECTED]'/>
            <item name='mood2' jid='[EMAIL PROTECTED]'/>
      </query>
</iq>

A client will interpret the answer as if JID "[EMAIL PROTECTED]" have a natural
name (as in XEP-0030) "mood1" or "mood2".

To be able to process items list correctly two conditions must be met:
1) A client must support pubsub.
2) A client must know that a discovered node is a pubsub leaf node
(so, it must perform a preliminary disco#info query) and its
interpretation of disco#items query must depend on the context (which
makes client development more complicated).

Is there any valid reason why disco#items query is used for requesting
published items (except that both are items)? Maybe it would be better
to switch to some more appropriate custom protocol?

Cheers!
-- 
Sergei Golovan

Reply via email to