mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
Fix spelling mistakes and typos in XEP-0413
This commit is contained in:
parent
4eb97375c4
commit
8a80ba8a7f
38
xep-0413.xml
38
xep-0413.xml
@ -43,28 +43,28 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section1 topic='Introduction' anchor='intro'>
|
<section1 topic='Introduction' anchor='intro'>
|
||||||
<p>&xep0060; §6.5.7 allows to retrieve the "most recent items" and &xep0313; state in §3.1 that archives are ordered in "chrnological order". While this order is straighforward in general use cases, it is sometimes desirable to use a different order, for instance while using &xep0277;: a spell mistake correction should not bring an old blog post to the top of retrieved items.</p>
|
<p>&xep0060; §6.5.7 allows to retrieve the "most recent items" and &xep0313; state in §3.1 that archives are ordered in "chronological order". While this order is straighforward in general use cases, it is sometimes desirable to use a different order, for instance while using &xep0277;: a spelling mistake correction should not bring an old blog post to the top of retrieved items.</p>
|
||||||
<p>This specification allows to explicitly change business logic to retrieve the items in a different order, in a similar way as the "ORDER BY" clause in SQL.</p>
|
<p>This specification allows to explicitly change business logic to retrieve the items in a different order, in a similar way as the "ORDER BY" clause in SQL.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Requirements' anchor='reqs'>
|
<section1 topic='Requirements' anchor='reqs'>
|
||||||
<ul>
|
<ul>
|
||||||
<li>an entity should be able to retrieve items by date of creation or by date of last modification (see below for definitions)</li>
|
<li>an entity should be able to retrieve items by date of creation or by date of last modification (see below for definitions)</li>
|
||||||
<li>the specification should be extensible to allow new ordering</li>
|
<li>the specification should be extensible to allow new ordering</li>
|
||||||
<li>in case of conflict, a 2nd, 3rd, etc. level of ordering should be possible</li>
|
<li>in case of conflicts, a 2nd, 3rd, etc. level of ordering should be possible</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Glossary' anchor='glossary'>
|
<section1 topic='Glossary' anchor='glossary'>
|
||||||
<p>In XEP-0060, there is no such thing as "updated item". This XEP changes the business logic as follow:</p>
|
<p>In XEP-0060, there is no such thing as "updated item". This XEP changes the business logic as follow:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>Date of creation</strong> — date when the item has been published <strong>ONLY if the item has a new id</strong> (i.e. an id which was not already present in the node at the time of publication). If an item re-use an existing id, it overwrites the original item <strong>and the date of creation stay the date of creation of the original item</strong></li>
|
<li><strong>Date of creation</strong> — date when the item has been published <strong>ONLY if the item has a new id</strong> (i.e. an id which was not already present in the node at the time of publication). If an item reuses an existing id, it overwrites the original item <strong>and the date of creation stays the date of creation of the original item</strong>.</li>
|
||||||
<li><strong>Date of modification</strong> — date when the item has been overwritten by a new item of the same id. If the item has never been overwritten, it is equal to the date of creation defined above.</li>
|
<li><strong>Date of modification</strong> — date when the item has been overwritten by a new item of the same id. If the item has never been overwritten, it is equal to the date of creation defined above.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Use Cases' anchor='usecases'>
|
<section1 topic='Use Cases' anchor='usecases'>
|
||||||
<section2 topic='Retrieve Items By Date of Creation' anchor='creation'>
|
<section2 topic='Retrieve Items By Date of Creation' anchor='creation'>
|
||||||
<p>Juliet wants to retrieve plays of his favorite writer, William Shakespeare. She wants to retrieve the 3 most recent ones by date of creation.</p>
|
<p>Juliet wants to retrieve plays of her favorite writer, William Shakespeare. She wants to retrieve the 3 most recent ones by date of creation.</p>
|
||||||
<p>To do so, her client do a regular Pubsub request, but add the <order> element as a children of the <pubsub> element with a namespace of <em>"urn:xmpp:order-by:0"</em> and with a 'by' attribute equal to "creation".</p>
|
<p>To do so, her client do a regular Pubsub request, but adds the <order> element as a children of the <pubsub> element with the <em>"urn:xmpp:order-by:0"</em> namespace and with a 'by' attribute equal to "creation".</p>
|
||||||
<example caption='Retrieving items ordered by date of creation'><![CDATA[
|
<example caption='Retrieving items ordered by date of creation'><![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='juliet@capulet.lit/balcony'
|
from='juliet@capulet.lit/balcony'
|
||||||
@ -76,7 +76,7 @@
|
|||||||
</pubsub>
|
</pubsub>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>Pubsub service then returns the 3 plays created the most recently, first one being the most recent</p>
|
<p>The Pubsub service then returns the 3 most recently created plays, first one being the most recent.</p>
|
||||||
<example caption='Service returns all items'><![CDATA[
|
<example caption='Service returns all items'><![CDATA[
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='pubsub.shakespeare.lit'
|
from='pubsub.shakespeare.lit'
|
||||||
@ -105,7 +105,7 @@
|
|||||||
]]></example>
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Retrieve Items By Date of Modification' anchor='modification'>
|
<section2 topic='Retrieve Items By Date of Modification' anchor='modification'>
|
||||||
<p>Juliet realize that there is a spelling mistake, it's "Winter's Tale" and not "Wintter's Tale". She fixes it by overwritting the item:</p>
|
<p>Juliet realizes that there is a spelling mistake, it's "Winter's Tale" and not "Wintter's Tale". She fixes it by overwritting the item:</p>
|
||||||
<example caption='Juliet Overwritte the Item to Fix It'><![CDATA[
|
<example caption='Juliet Overwritte the Item to Fix It'><![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='juliet@capulet.lit/balcony'
|
from='juliet@capulet.lit/balcony'
|
||||||
@ -122,7 +122,7 @@
|
|||||||
</pubsub>
|
</pubsub>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>To check that everything is alright, she request again the last 3 items, but this time by date of modification. To do so, he client proceed the same way as for date of creation, except that it uses the value "modification" for the 'by' attribute</p>
|
<p>To check that everything is alright, she requests again the last 3 items, but this time by date of modification. To do so, the client proceeds the same way as for date of creation, except that it uses the value "modification" for the 'by' attribute.</p>
|
||||||
<example caption='Retrieving items ordered by date of modification'><![CDATA[
|
<example caption='Retrieving items ordered by date of modification'><![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='juliet@capulet.lit/balcony'
|
from='juliet@capulet.lit/balcony'
|
||||||
@ -134,7 +134,7 @@
|
|||||||
</pubsub>
|
</pubsub>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>Pubsub service returns again the 3 plays but the "Winter Tales" item has been overwritten recently, while the 2 others have never been overwritten, so it returns the items in the following order, with most recently modified item on top:</p>
|
<p>The Pubsub service returns again the 3 plays but the "Winter Tales" item has been overwritten recently, while the 2 others have never been overwritten, so it returns the items in the following order, with the most recently modified item on top:</p>
|
||||||
<example caption='Service returns all items'><![CDATA[
|
<example caption='Service returns all items'><![CDATA[
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='pubsub.shakespeare.lit'
|
from='pubsub.shakespeare.lit'
|
||||||
@ -171,19 +171,19 @@
|
|||||||
</query>
|
</query>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>This way, filters can be used with specific ordering</p>
|
<p>This way, filters can be used with a specific ordering.</p>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Reversing the Order' anchor='reverse'>
|
<section2 topic='Reversing the Order' anchor='reverse'>
|
||||||
<p>The ordering can be reversed by using the mechanisms already provided by &xep0059;</p>
|
<p>The ordering can be reversed by using the mechanisms already provided by &xep0059;.</p>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Extending this Specification' anchor='extending'>
|
<section2 topic='Extending this Specification' anchor='extending'>
|
||||||
<p>This specification can be extended by further XEPs, proposing other kind of ordering in the 'by' attribute (e.g. ordering by filename for a file sharing service). But this is beyond the scope of this XEPs, and a client should not assume that other ordering than "creation" and "modification" are available without negociation.</p>
|
<p>This specification can be extended by further XEPs, proposing other kind of ordering in the 'by' attribute (e.g. ordering by filename for a file sharing service). But this is beyond the scope of this XEP, and a client should not assume that other ordering than "creation" and "modification" are available without negociation.</p>
|
||||||
<p>In a similar way, the semantic described here could be re-used in other use cases as for Pubsub or MAM, but this would need to be detailed in a separate specification.</p>
|
<p>In a similar way, the semantic described here could be reused in other use cases as for Pubsub or MAM, but this would need to be detailed in a separate specification.</p>
|
||||||
</section2>
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Discovering Support' anchor='disco'>
|
<section1 topic='Discovering Support' anchor='disco'>
|
||||||
<p>If a server supports the "order by" protocol, it MUST report that fact by including a service discovery feature of "urn:xmpp:order-by:0" &NSNOTE; in response to a &xep0030; information request:</p>
|
<p>If a server supports the "order by" protocol, it MUST advertize it including the "urn:xmpp:order-by:0" discovery feature &NSNOTE; in response to a &xep0030; information request:</p>
|
||||||
<example caption="Service Discovery information request"><![CDATA[
|
<example caption="Service Discovery information request"><![CDATA[
|
||||||
<iq from='example.org'
|
<iq from='example.org'
|
||||||
id='disco1'
|
id='disco1'
|
||||||
@ -198,21 +198,21 @@
|
|||||||
to='example.org'
|
to='example.org'
|
||||||
type='result'>
|
type='result'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||||
...
|
…
|
||||||
<feature var='urn:xmpp:order-by:0'/>
|
<feature var='urn:xmpp:order-by:0'/>
|
||||||
...
|
…
|
||||||
</query>
|
</query>
|
||||||
</iq>
|
</iq>
|
||||||
]]></example>
|
]]></example>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Business Rules' anchor='rules'>
|
<section1 topic='Business Rules' anchor='rules'>
|
||||||
<p>Several ordering elements may be used, this allow to solve next levels of ordering in case of conflicts. In this case, the first ordering (i.e. the top most <order> element) is the main one, the the second <order> element is used in case of conflict, then the next one if a new conflict happen and so on.</p>
|
<p>Several ordering elements may be used, this allows to solve next levels of ordering in case of conflicts. In this case, the first ordering (i.e. the top most <order> element) is the main one, the second <order> element is used in case of conflicts, then the next one if a new conflict happens and so on.</p>
|
||||||
<p>In case of conflict, if no new <order> element is specified, the item order is not guarented and is up to the implementation</p>
|
<p>In case of conflicts, if no new <order> element is specified, the item order is not guaranted and is up to the implementation.</p>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Implementation Notes' anchor='impl'>
|
<section1 topic='Implementation Notes' anchor='impl'>
|
||||||
<p>For implementations based on SQL databases, the "ORDER BY" clause can be used to easily implement this specification. Other kind of databases should have similar mechanisms</p>
|
<p>For implementations based on SQL databases, the "ORDER BY" clause can be used to easily implement this specification. Other kind of databases should have similar mechanisms.</p>
|
||||||
</section1>
|
</section1>
|
||||||
|
|
||||||
<section1 topic='Security Considerations' anchor='security'>
|
<section1 topic='Security Considerations' anchor='security'>
|
||||||
|
Loading…
Reference in New Issue
Block a user