1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-27 19:52:18 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2354 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-10-09 04:17:51 +00:00
parent abb473544e
commit db9750991d

View File

@ -137,7 +137,7 @@
<section2 topic='Limiting the Number of Items' anchor='limit'> <section2 topic='Limiting the Number of Items' anchor='limit'>
<p>In order to limit the number of items of a result set to be returned, the requesting entity specifies a request type of "set" and the maximum size of the desired subset (via the XML character data of the &lt;max/&gt; element):</p> <p>In order to limit the number of items of a result set to be returned, the requesting entity specifies a request type of "set" and the maximum size of the desired subset (via the XML character data of the &lt;max/&gt; element):</p>
<example caption='Requesting a Limit to the Result Set'><![CDATA[ <example caption='Requesting a Limit to the Result Set'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='limit1'> <iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='limit1'>
<query xmlns='jabber:iq:search'> <query xmlns='jabber:iq:search'>
<nick>Pete</nick> <nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
@ -180,7 +180,7 @@
<p>Note: If a responding entity implements dynamic result sets then receiving entities paging through the complete result set should be aware that it may not correspond to the result set as it existed at any one point in time.</p> <p>Note: If a responding entity implements dynamic result sets then receiving entities paging through the complete result set should be aware that it may not correspond to the result set as it existed at any one point in time.</p>
<p>The request for the first page is the same as when <link url='#limit'>Limiting the Number of Items</link>:</p> <p>The request for the first page is the same as when <link url='#limit'>Limiting the Number of Items</link>:</p>
<example caption='Requesting the First Page of a Result Set'><![CDATA[ <example caption='Requesting the First Page of a Result Set'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='page1'> <iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='page1'>
<query xmlns='jabber:iq:search'> <query xmlns='jabber:iq:search'>
<nick>Pete</nick> <nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
@ -219,7 +219,7 @@
]]></example> ]]></example>
<p>The requesting entity can then ask for the next page in the result set by including in its request the UID of the <em>last</em> item from the previous page (encapsulated in an &lt;after/&gt; element), along with the maximum number of items to return. Note: If no &lt;after/&gt; element is specified, then the UID defaults to "before the first item in the result set" (i.e., effectively an index of negative one).</p> <p>The requesting entity can then ask for the next page in the result set by including in its request the UID of the <em>last</em> item from the previous page (encapsulated in an &lt;after/&gt; element), along with the maximum number of items to return. Note: If no &lt;after/&gt; element is specified, then the UID defaults to "before the first item in the result set" (i.e., effectively an index of negative one).</p>
<example caption='Requesting the Second Page of a Result Set'><![CDATA[ <example caption='Requesting the Second Page of a Result Set'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='page2'> <iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='page2'>
<query xmlns='jabber:iq:search'> <query xmlns='jabber:iq:search'>
<nick>Pete</nick> <nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
@ -269,7 +269,7 @@
<section2 topic='Paging Backwards Through a Result Set' anchor='backwards'> <section2 topic='Paging Backwards Through a Result Set' anchor='backwards'>
<p>The requesting entity MAY ask for the previous page in a result set by including in its request the UID of the <em>first</em> item from the page that has already been received (encapsulated in a &lt;before/&gt; element), along with the maximum number of items to return.</p> <p>The requesting entity MAY ask for the previous page in a result set by including in its request the UID of the <em>first</em> item from the page that has already been received (encapsulated in a &lt;before/&gt; element), along with the maximum number of items to return.</p>
<example caption='Requesting the Previous Page of a Result Set'><![CDATA[ <example caption='Requesting the Previous Page of a Result Set'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='back1'> <iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='back1'>
<query xmlns='jabber:iq:search'> <query xmlns='jabber:iq:search'>
<nick>Pete</nick> <nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
@ -330,7 +330,7 @@
<section2 topic='Requesting the Last Page in a Result Set' anchor='last'> <section2 topic='Requesting the Last Page in a Result Set' anchor='last'>
<p>The requesting entity MAY ask for the last page in a result set by including in its request an empty &lt;before/&gt; element, and the maximum number of items to return.</p> <p>The requesting entity MAY ask for the last page in a result set by including in its request an empty &lt;before/&gt; element, and the maximum number of items to return.</p>
<example caption='Requesting the Last Page of a Result Set'><![CDATA[ <example caption='Requesting the Last Page of a Result Set'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='page1'> <iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='page1'>
<query xmlns='jabber:iq:search'> <query xmlns='jabber:iq:search'>
<nick>Pete</nick> <nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
@ -346,7 +346,7 @@
<p>Only if the UID before the start (or after the end) of a desired result set page is not known, then the requesting entity MAY request the page that <em>starts</em> at a particular index within the result set. It does that by including in its request the index of the <em>first</em> item to be returned (encapsulated in an &lt;index/&gt; element), as well as the maximum number of items to return. Note: For reasons mentioned in <link url='#forwards'>Paging Forwards Through a Result Set</link> requesting entities SHOULD, where possible, specify pages using a UID instead of an index.</p> <p>Only if the UID before the start (or after the end) of a desired result set page is not known, then the requesting entity MAY request the page that <em>starts</em> at a particular index within the result set. It does that by including in its request the index of the <em>first</em> item to be returned (encapsulated in an &lt;index/&gt; element), as well as the maximum number of items to return. Note: For reasons mentioned in <link url='#forwards'>Paging Forwards Through a Result Set</link> requesting entities SHOULD, where possible, specify pages using a UID instead of an index.</p>
<p>Note: If the responding entity omitted the &lt;count/&gt; element from previous responses for this result set, then the requesting entity SHOULD assume that the responding entity does not support page retrieval by index for this result set (see error below).</p> <p>Note: If the responding entity omitted the &lt;count/&gt; element from previous responses for this result set, then the requesting entity SHOULD assume that the responding entity does not support page retrieval by index for this result set (see error below).</p>
<example caption='Requesting a Result Page by Index'><![CDATA[ <example caption='Requesting a Result Page by Index'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='index10'> <iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='index10'>
<query xmlns='jabber:iq:search'> <query xmlns='jabber:iq:search'>
<nick>Pete</nick> <nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
@ -401,7 +401,7 @@
<section2 topic='Getting the Item Count' anchor='count'> <section2 topic='Getting the Item Count' anchor='count'>
<p>In order to get the item count of a result set without retrieving the items themselves, the requesting entity simply specifies zero for the maximum size of the result set page:</p> <p>In order to get the item count of a result set without retrieving the items themselves, the requesting entity simply specifies zero for the maximum size of the result set page:</p>
<example caption='Requesting the Item Count'><![CDATA[ <example caption='Requesting the Item Count'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='count1'> <iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='count1'>
<query xmlns='jabber:iq:search'> <query xmlns='jabber:iq:search'>
<nick>Pete</nick> <nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
@ -427,7 +427,7 @@
<section1 topic='Examples' anchor='examples'> <section1 topic='Examples' anchor='examples'>
<p>The foregoing examples show the use of result set management in the context of <cite>Jabber Search</cite>. In the following examples we show the use of this protocol in the context of <cite>Service Discovery</cite>. <cite>XEP-0136</cite> ("Message Archiving") includes more examples. A future version of this document may also include examples from <cite>Publish-Subscribe</cite> and other XMPP protocol extensions.</p> <p>The foregoing examples show the use of result set management in the context of <cite>Jabber Search</cite>. In the following examples we show the use of this protocol in the context of <cite>Service Discovery</cite>. <cite>XEP-0136</cite> ("Message Archiving") includes more examples. A future version of this document may also include examples from <cite>Publish-Subscribe</cite> and other XMPP protocol extensions.</p>
<example caption='Requesting a Limit to the Result Set'><![CDATA[ <example caption='Requesting a Limit to the Result Set'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='conference.jabber.org' id='ex2'> <iq type='set' from='stpeter@jabber.org/roundabout' to='conference.jabber.org' id='ex2'>
<query xmlns='http://jabber.org/protocol/disco#items'> <query xmlns='http://jabber.org/protocol/disco#items'>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
<max>20</max> <max>20</max>
@ -467,7 +467,7 @@
</iq> </iq>
]]></example> ]]></example>
<example caption='Requesting a Page Beginning After the Last Item Received'><![CDATA[ <example caption='Requesting a Page Beginning After the Last Item Received'><![CDATA[
<iq type='get' from='stpeter@jabber.org/roundabout' to='conference.jabber.org' id='ex3'> <iq type='set' from='stpeter@jabber.org/roundabout' to='conference.jabber.org' id='ex3'>
<query xmlns='http://jabber.org/protocol/disco#items'> <query xmlns='http://jabber.org/protocol/disco#items'>
<set xmlns='http://jabber.org/protocol/rsm'> <set xmlns='http://jabber.org/protocol/rsm'>
<max>20</max> <max>20</max>
@ -477,7 +477,7 @@
</iq> </iq>
]]></example> ]]></example>
</section1> </section1>
<section1 topic='Determining Support' anchor='disco'> <section1 topic='Determining Support' anchor='support'>
<p>In order for a requesting entity to determine if a responding entity supports result set management, it SHOULD send a <cite>Service Discovery</cite> information request to the responding entity:</p> <p>In order for a requesting entity to determine if a responding entity supports result set management, it SHOULD send a <cite>Service Discovery</cite> information request to the responding entity:</p>
<example caption='Requesting entity queries responding entity regarding protocol support'><![CDATA[ <example caption='Requesting entity queries responding entity regarding protocol support'><![CDATA[
<iq from='stpeter@jabber.org/roundabout' <iq from='stpeter@jabber.org/roundabout'
@ -493,9 +493,7 @@
type='result' type='result'
id='disco1'> id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'> <query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='http://jabber.org/protocol/rsm'/> <feature var='http://jabber.org/protocol/rsm'/>
...
</query> </query>
</iq> </iq>
]]></example> ]]></example>