[Standards-JIG] Call for Experience: JEP-0030 (Service Discovery)

Peter Saint-Andre stpeter at jabber.org
Mon Apr 26 17:31:26 UTC 2004


On Mon, Apr 26, 2004 at 10:36:30AM +0100, Ian Paterson wrote:

> This quote from section 4.1.2 Nodes:
> "Node attributes SHOULD NOT be used unless it is necessary to provide or
> discover information about entities that are not directly addressable as
> JIDs. The value of the 'node' attribute MUST NOT be null."
> 
> This seems to imply that child nodes cannot have different jids to the
> parent node. 

I think you're reading too much into that statement. All it says is: "If
the associated item can be addressed as a JID, don't include a node." So
the following scenarios are perfectly valid:

1. Query JID1 for items, get back a list of items that can be 
   addressed as JIDs; each item has its own JID, but no such JID 
   equals JID1.

2. Query JID1 for items, get back a list of items that cannot be
   addressed as JIDs; each item is addressed as JID+node, where 
   JID = JID1 and each NodeID is unique.

3. Query JID1+node for items, get back a list of items that can be 
   addressed as JIDs; each item has its own JID, but no such JID 
   equals JID1.

4. Query JID1+node for items, get back a list of items that cannot 
   be addressed as JIDs; each item is addressed as JID+node, where 
   JID != JID1 and each NodeID is unique.

You may think the fourth one is odd, but the key is that JID1 needs to
have some relationship of ownership over the items. Consider the case of
owning multiple pubsub nodes (for example, one such node for each music
player I own). If you query JID=stpeter at jabber.org + node=tune-ns (see
JEP-0118), I might return to you a list of items that cannot be
addressed as JIDs, where each item is a tune-related pubsub node that 
is hosted at a different pubsub service (pubsub.jabber.org for one,
pubsub.saint-andre.com for another, etc.).

So your example is just fine....

> Here is an example of a directory of chat rooms:
> 
> <iq type='result'
>     from='conference.foo.bar'
>     to='romeo at montague.net/orchard'>
>   <query xmlns='http://jabber.org/protocol/disco#items'
>          node='literature/shakespeare'>
>     <item jid='macbeth at conference.foo.bar'
>           name='Macbeth'/>
>     <item jid='othello at conference.foo.bar'
>           name='Othello'/>
>     <item jid='hamlet at conference.foo.bar'
>           name='Hamlet'/>
>   </query>
> </iq>
> 
> Could you please make it clear whether a *node* may have children with
> different jids.

Sure, why not? Do you feel that needs to be more explicit in JEP-0030?

Peter




More information about the Standards mailing list