[jdev] Retrieving items list for a pubsub nide
stpeter at stpeter.im
Fri Mar 21 09:54:30 CDT 2008
Sergei Golovan wrote:
> 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
> 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.
True, but why would a naive client send this kind of request in the
> <iq id='21' to='some at jid' type='get' xml:lang='en'>
> <query xmlns='http://jabber.org/protocol/disco#items'
> <iq from='some at jid' id='21' type='result' to='some at jid/resource'>
> <query node='http://jabber.org/protocol/mood'
> <item name='mood1' jid='some at jid'/>
> <item name='mood2' jid='some at jid'/>
> A client will interpret the answer as if JID "some at jid" 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).
I think a client would drill down this far only if it knew that the mood
node was pubsub-related.
> 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?
Despite what I typed above, I think you make a good point. Notice that
we do something similar in the language translation protocol (XEP-0171).
Perhaps some input from client developers would be useful here...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
More information about the JDev