[Standards] Retrieving pubsub items via their IDs + RSM

Adrien souliane at mailoo.org
Thu Dec 4 08:57:49 UTC 2014


Hi guys,

suppose a pubsub service is implementing XEP-0059 and it is configured 
to return a maximum number of 2 items.

Then what should happen when the user wants to retrieve items by 
specifying their IDs?

Case 1:

   <pubsub xmlns='http://jabber.org/protocol/pubsub'>
     <items node='princely_musings'>
       <item id='A'/>
       <item id='B'/>
       <item id='C'/>
       <item id='D'/>
       <item id='E'/>
       <item id='F'/>
     </items>
   </pubsub>

What to return here? All the items or only A and B? Does it make sense 
for the service to answer with an embedded <set> element? Something like 
that maybe:

     <set xmlns='http://jabber.org/protocol/rsm'>
       <first index='0'>A</first>
       <last>B</last>
       <count>19</count>
     </set>

Case 2:

   <pubsub xmlns='http://jabber.org/protocol/pubsub'>
     <items node='princely_musings'>
       <item id='A'/>
       <item id='E'/>
       <item id='C'/>
       <item id='D'/>
       <item id='B'/>
       <item id='F'/>
     </items>
   </pubsub>

We assume that the item indexes are following the alphabetical order (A 
has index 0, B index 2... what to return here? All the items, only A and 
B or only A and E?! What about the <set> element? Isn't strange if A and 
E are returned (we could not call it a page anymore!)?

Case 3:

   <pubsub xmlns='http://jabber.org/protocol/pubsub'>
     <items node='princely_musings'>
       <item id='A'/>
       <item id='B'/>
       <item id='C'/>
       <item id='D'/>
       <item id='E'/>
       <item id='F'/>
     </items>
     <set xmlns='http://jabber.org/protocol/rsm'>
       <max>2</max>
     </set>
   </pubsub>

Maybe the answers to cases 1 and 2 are "don't return a set when the 
request specifies the item IDs", but what now if it also explicitly asks 
for a set?

Or do you just say that the client should not be stupid and make 
coherent requests? :)

Many thanks,
Adrien



More information about the Standards mailing list