1.0 DRAFT

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2088 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-07-17 02:47:00 +00:00
parent e2f43f18bc
commit 994bc891a5
1 changed files with 88 additions and 68 deletions

View File

@ -10,7 +10,7 @@
<abstract>This document defines mechanisms and preferences for the archiving and retrieval of XMPP messages.</abstract>
&LEGALNOTICE;
<number>0136</number>
<status>Proposed</status>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>
@ -22,7 +22,10 @@
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
<shortname>archive</shortname>
<schemaloc>
<url>http://www.xmpp.org/schemas/archive.xsd</url>
</schemaloc>
&ianpaterson;
<author>
<firstname>Jon</firstname>
@ -32,6 +35,12 @@
</author>
&stpeter;
&infiniti;
<revision>
<version>1.0</version>
<date>2008-07-16</date>
<initials>psa</initials>
<remark><p>Per a vote of the XMPP Council, advanced status to Draft; concurrently, the XMPP Registrar issued the urn:xmpp:archive namespace.</p></remark>
</revision>
<revision>
<version>0.18</version>
<date>2008-05-19</date>
@ -177,7 +186,7 @@
<p>An example follows.</p>
<example caption='Complete Preferences'><![CDATA[
<iq type='result' id='pref1' to='juliet@capulet.com/chamber'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<auto save='false'/>
<default expire='31536000' otr='concede' save='body'/>
<item jid='romeo@montague.net' otr='require' save='false'/>
@ -274,16 +283,16 @@
</section3>
</section2>
<section2 topic='Determining Preferences' anchor='pref-determine'>
<p>In order to determine its user's current Save Mode(s) and OTR Mode(s), a client sends to its server an IQ-get containing an empty &lt;pref/&gt; element qualified by the 'urn:xmpp:tmp:archive' namespace &NSNOTE;.</p>
<p>In order to determine its user's current Save Mode(s) and OTR Mode(s), a client sends to its server an IQ-get containing an empty &lt;pref/&gt; element qualified by the 'urn:xmpp:archive' namespace.</p>
<example caption='Client Requests Archiving Preferences'><![CDATA[
<iq type='get' id='pref1'>
<pref xmlns='urn:xmpp:tmp:archive'/>
<pref xmlns='urn:xmpp:archive'/>
</iq>
]]></example>
<p>The server responds with the default Save Mode and OTR Mode (a single &lt;default/&gt; element) and any specific Save Modes and OTR Modes for individual contacts (zero or more &lt;item/&gt; elements).</p>
<example caption='Server Returns Preferences'><![CDATA[
<iq type='result' id='pref1' to='juliet@capulet.com/chamber'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<auto save='false'/>
<default expire='31536000' otr='concede' save='body'/>
<item jid='romeo@montague.net' otr='require' save='false'/>
@ -306,7 +315,7 @@
<p>If the user has never set the default Modes, the 'save' and 'otr' attributes SHOULD specify the server's default settings, and the 'unset' attribute SHOULD be set to 'true'. Note: The 'unset' attribute defaults to 'false'.</p>
<example caption='Server Returns Service Default Preferences'><![CDATA[
<iq type='result' id='pref1' to='juliet@capulet.com/chamber'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<default otr='concede' save='false' unset='true'/>
<method type='auto' use='concede'/>
<method type='local' use='concede'/>
@ -321,7 +330,7 @@
<p>A client may set the default Modes:</p>
<example caption='Client Sets Default Modes'><![CDATA[
<iq type='set' id='pref2'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<default otr='prefer' save='false'/>
</pref>
</iq>
@ -333,13 +342,13 @@
<p>The server then MUST inform all of the user's connected resources that have previously requested the user's archiving preferences:</p>
<example caption='Server Pushes New Modes'><![CDATA[
<iq type='set' id='push1' to='juliet@capulet.com/chamber'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<default otr='prefer' save='false'/>
</pref>
</iq>
<iq type='set' id='push2' to='juliet@capulet.com/pda'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<default otr='prefer' save='false'/>
</pref>
</iq>
@ -351,7 +360,7 @@
<p>A client may use a similar protocol to set the Modes for a particular contact or domain of contacts (bare JID, full JID or domain). Note: It is STRONGLY RECOMMENDED for the value of the 'jid' attribute to be a bare JID &LOCALBARE; rather than a full JID &LOCALFULL;.</p>
<example caption='Client Sets Modes for a Contact'><![CDATA[
<iq type='set' id='pref3'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<item jid='romeo@montague.net' save='body' expire='604800' otr='concede'/>
</pref>
</iq>
@ -361,13 +370,13 @@
]]></example>
<example caption='Server Pushes New Modes'><![CDATA[
<iq type='set' id='push3' to='juliet@capulet.com/chamber'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<item jid='romeo@montague.net' save='body' expire='604800' otr='concede'/>
</pref>
</iq>
<iq type='set' id='push4' to='juliet@capulet.com/pda'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<item jid='romeo@montague.net' save='body' expire='604800' otr='concede'/>
</pref>
</iq>
@ -376,7 +385,7 @@
<p>In order to remove all preferences for a contact, the client shall send an &lt;itemremove/&gt; element to the server.</p>
<example caption='Client Removes Preferences for a Contact'><![CDATA[
<iq type='set' id='remove1'>
<itemremove xmlns='urn:xmpp:tmp:archive'>
<itemremove xmlns='urn:xmpp:archive'>
<item jid='benvolio@montague.net'/>
</itemremove>
</iq>
@ -389,7 +398,7 @@
<p>The client can set one or more method preferences by sending an IQ-set containing a &lt;pref/&gt; element that in turn contains one or more &lt;method/&gt; elements.</p>
<example caption='Client Sets Method Preferences'><![CDATA[
<iq type='set' id='pref4'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<method type='auto' use='concede'/>
<method type='local' use='forbid'/>
<method type='manual' use='prefer'/>
@ -402,7 +411,7 @@
<p>If the client includes less than three &lt;method/&gt; elements, the server MUST NOT modify the unspecified methods and MUST leave them as currently stored on the server. However, when the server pushes the method preferences it MUST include all of the preferences, not only those that were set by the client.</p>
<example caption='Server Pushes New Method Preferences'><![CDATA[
<iq type='set' id='push5' to='juliet@capulet.com/chamber'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<method type='auto' use='concede'/>
<method type='local' use='forbid'/>
<method type='manual' use='prefer'/>
@ -410,7 +419,7 @@
</iq>
<iq type='set' id='push6' to='juliet@capulet.com/pda'>
<pref xmlns='urn:xmpp:tmp:archive'>
<pref xmlns='urn:xmpp:archive'>
<method type='auto' use='concede'/>
<method type='local' use='forbid'/>
<method type='manual' use='prefer'/>
@ -578,7 +587,7 @@
<p>A collection of messages and notes is uploaded to the server encapsulated in a &lt;save/&gt; element.</p>
<example caption='Storing messages in a collection'><![CDATA[
<iq type='set' id='up1'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
thread='damduoeg08'
@ -594,7 +603,7 @@
<p>If the collection does not exist then the server MUST create a new collection and inform the client that the collection version number is zero.</p>
<example caption='Collection created'><![CDATA[
<iq type='result' id='up1'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
thread='damduoeg08'
@ -607,7 +616,7 @@
<p>If the collection already exists then the server MUST append the messages to the existing collection (which MAY involve adding messages that appear to be duplicates, i.e., messages that have identical &lt;from/&gt; elements, &lt;to/&gt; elements, and dateTimes).</p>
<example caption='Messages appended to collection'><![CDATA[
<iq type='result' id='up1'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
thread='damduoeg08'
@ -631,7 +640,7 @@
<p>If the client specifies a new value for the 'subject' attribute of any existing collection then the server MUST update the existing value and increment the collection version. Note: The client cannot specify new values for the 'with' or 'start' attributes. The only way to change these values is to delete the collection (see <link url='#manage-remove'>Removing a Collection</link>) and then create a new one.</p>
<example caption='Changing the subject of a collection without appending messages'><![CDATA[
<iq type='set' id='subject1'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
subject='She speaks twice!'/>
@ -640,7 +649,7 @@
]]></example>
<example caption='Collection subject updated'><![CDATA[
<iq type='result' id='subject1'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
subject='She speaks twice!'
@ -654,7 +663,7 @@
<p>The client MAY specify an absolute time for any message by providing a 'utc' attribute (which MUST be UTC and adhere to the DateTime format specified in <cite>XEP-0082</cite>) instead of a 'secs' attribute. The absolute time MAY be earlier than the start time of the collection:</p>
<example caption='Storing offline messages in a collection'><![CDATA[
<iq type='set' id='up2'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
subject='She speaks!'>
@ -670,7 +679,7 @@
<p>A client MAY archive messages that it receives from &xep0045; rooms. The 'with' attribute MUST be the bare JID of the room. The client MUST include a 'name' attribute for each &lt;from/&gt; element to specify the room nickname of the message sender and MAY include a 'jid' attribute to specify the full or bare JID of the sender (if available).</p>
<example caption='Storing groupchat messages in a collection'><![CDATA[
<iq type='set' id='up3'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='balcony@house.capulet.com'
start='1469-07-21T03:16:37Z'>
<from secs='0' name='benvolio'><body>She will invite him to some supper.</body></from>
@ -685,7 +694,7 @@
<p>Collections MAY be linked together by including a &lt;previous/&gt; and/or &lt;next/&gt; element. Each such element MUST include both a 'with' and a 'start' element to identify the other collection to which the collection is linked. For example, the &lt;previous/&gt; and &lt;next/&gt; elements in the two examples below are being used to link a groupchat between Romeo, Benvolio and Mercutio to a private chat that Romeo was having with Benvolio before they invited Mercutio to join them. Note: Collections MAY be linked in only one direction, they are not required to be double-linked in the way the examples below are.</p>
<example caption='Private chat linked to later groupchat'><![CDATA[
<iq type='set' id='link1'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='benvolio@montague.net'
start='1469-07-21T03:01:54Z'>
<next with='balcony@house.capulet.com' start='1469-07-21T03:16:37Z'/>
@ -697,7 +706,7 @@
]]></example>
<example caption='Groupchat linked to earlier private chat'><![CDATA[
<iq type='set' id='link2'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='balcony@house.capulet.com'
start='1469-07-21T03:16:37Z'>
<previous with='benvolio@montague.net' start='1469-07-21T03:01:54Z'/>
@ -713,7 +722,7 @@
<p>&lt;previous/&gt; and &lt;next/&gt; elements MAY be removed from a collection simply by uploading a &lt;previous/&gt; and/or &lt;next/&gt; element without any 'with' or 'start' attributes. Note: The server SHOULD NOT return an error if it finds that a link to be deleted does not exist.</p>
<example caption='Deleting any links to other collections'><![CDATA[
<iq type='set' id='link3'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='balcony@house.capulet.com'
start='1469-07-21T03:16:37Z'>
<previous/>
@ -729,7 +738,7 @@
<p>Any data forms for associating attributes are application-specific and are to be defined outside this specification. The following example shows attributes generated by a fictional application.</p>
<example caption='Private chat with attributes form'><![CDATA[
<iq type='set' id='form1'>
<save xmlns='urn:xmpp:tmp:archive'>
<save xmlns='urn:xmpp:archive'>
<chat with='benvolio@montague.net'
start='1469-07-21T03:01:54Z'>
<to secs='0'><body>O, I am fortune's fool!</body></to>
@ -771,7 +780,7 @@
<p>The client can enable auto-archiving by setting the 'save' attribute to "true" or "1".</p>
<example caption='Client enables auto archiving'><![CDATA[
<iq type='set' id='auto1'>
<auto save='true' xmlns='urn:xmpp:tmp:archive'/>
<auto save='true' xmlns='urn:xmpp:archive'/>
</iq>
]]></example>
<p>If the server does not support the saving of full message stanza or stream content and the user has specified the 'message' or 'stream' Save Mode in one of its <link url='#pref'>Archiving Preferences</link>, the server MUST return a &feature; error.</p>
@ -785,7 +794,7 @@
<p>The client can disable auto-archiving by setting the 'save' attribute to "false" or "0".</p>
<example caption='Client disables auto archiving'><![CDATA[
<iq type='set' id='auto3'>
<auto save='false' xmlns='urn:xmpp:tmp:archive'/>
<auto save='false' xmlns='urn:xmpp:archive'/>
</iq>
]]></example>
<p>If service policies require that every message is logged automatically, the server MUST return a &notallowed; error.</p>
@ -813,7 +822,7 @@
<p>The client SHOULD use <cite>Result Set Management</cite> to limit the number of collections returned by the server in a single stanza, taking care not to request a page of collections that is so big it might exceed rate limiting restrictions.</p>
<example caption='Requesting the first page of a list with same JID'><![CDATA[
<iq type='get' id='juliet1'>
<list xmlns='urn:xmpp:tmp:archive'
<list xmlns='urn:xmpp:archive'
with='juliet@capulet.com'>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>30</max>
@ -823,7 +832,7 @@
]]></example>
<example caption='Requesting the first page of a list with same JID between two times'><![CDATA[
<iq type='get' id='period1'>
<list xmlns='urn:xmpp:tmp:archive'
<list xmlns='urn:xmpp:archive'
with='juliet@capulet.com'
start='1469-07-21T02:00:00Z'
end='1479-07-21T04:00:00Z'>
@ -835,7 +844,7 @@
]]></example>
<example caption='Requesting the first page of a list after a time'><![CDATA[
<iq type='get' id='list1'>
<list xmlns='urn:xmpp:tmp:archive'
<list xmlns='urn:xmpp:archive'
start='1469-07-21T02:00:00Z'>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>30</max>
@ -848,12 +857,12 @@
<p>If no collections correspond to the request the server MUST return an empty &lt;list/&gt; element:</p>
<example caption='Receiving an empty list'><![CDATA[
<iq type='result' to='romeo@montague.net/orchard' id='list1'>
<list xmlns='urn:xmpp:tmp:archive'/>
<list xmlns='urn:xmpp:archive'/>
</iq>
]]></example>
<example caption='Requesting the second page of a list'><![CDATA[
<iq type='get' id='list2'>
<list xmlns='urn:xmpp:tmp:archive'
<list xmlns='urn:xmpp:archive'
start='1469-07-21T02:00:00Z'>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>30</max>
@ -870,7 +879,7 @@
<p>The client SHOULD use <cite>Result Set Management</cite> to limit the number of messages returned by the server in a single stanza, taking care not to request a page of messages that is so big it might exceed rate limiting restrictions.</p>
<example caption='Requesting the first page of a collection'><![CDATA[
<iq type='get' id='page1'>
<retrieve xmlns='urn:xmpp:tmp:archive'
<retrieve xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'>
<set xmlns='http://jabber.org/protocol/rsm'>
@ -881,7 +890,7 @@
]]></example>
<example caption='Receiving the first page of a collection'><![CDATA[
<iq type='result' to='romeo@montague.net/orchard' id='page1'>
<chat xmlns='urn:xmpp:tmp:archive'
<chat xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
subject='She speaks!'
@ -904,7 +913,7 @@
<p>If the specified collection does not exist then the server MUST return an &notfound; error:</p>
<example caption='Unsuccessful reply'><![CDATA[
<iq type='error' to='romeo@montague.net/orchard' id='page1'>
<retrieve xmlns='urn:xmpp:tmp:archive'
<retrieve xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'>
<set xmlns='http://jabber.org/protocol/rsm'>
@ -919,7 +928,7 @@
<p>If the requested collection is empty the server MUST return an empty &lt;chat/&gt; element:</p>
<example caption='Receiving an empty collection'><![CDATA[
<iq type='result' to='romeo@montague.net/orchard' id='page1'>
<chat xmlns='urn:xmpp:tmp:archive'
<chat xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
subject='She speaks!'
@ -928,7 +937,7 @@
]]></example>
<example caption='Requesting the second page of a collection'><![CDATA[
<iq type='get' id='page2'>
<retrieve xmlns='urn:xmpp:tmp:archive'
<retrieve xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'>
<set xmlns='http://jabber.org/protocol/rsm'>
@ -944,7 +953,7 @@
<p>To request the removal of a single collection the client sends an empty &lt;remove/&gt; element. The 'with' and 'start' attributes MUST be included to uniquely identify the collection.</p>
<example caption='Removing a single collection'><![CDATA[
<iq type='set' id='remove1'>
<remove xmlns='urn:xmpp:tmp:archive'
<remove xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'/>
</iq>
@ -953,7 +962,7 @@
<p>In addition, the client MAY match an exact bare JID &BAREJID; by setting the boolean 'exactmatch' attribute to a value of "true" or "1" &BOOLEANNOTE; -- for details, refer to the <link url='#impl-exactmatch'>Exact JID Matching</link> section of this document.</p>
<example caption='Removing all collections with a specified bare JID between two times'><![CDATA[
<iq type='set' id='remove2'>
<remove xmlns='urn:xmpp:tmp:archive'
<remove xmlns='urn:xmpp:archive'
with='juliet@capulet.com'
start='1469-07-21T02:00:00Z'
end='1469-07-21T04:00:00Z'/>
@ -963,7 +972,7 @@
<p>If the end date is in the future then all collections on or after the start date are removed.</p>
<example caption='Removing all collections after a date'><![CDATA[
<iq type='set' id='remove3'>
<remove xmlns='urn:xmpp:tmp:archive'
<remove xmlns='urn:xmpp:archive'
start='1469-07-21T02:00:00Z'
end='2038-01-01T00:00:00Z'/>
</iq>
@ -971,34 +980,34 @@
<p>If the start date is before all the collections in the archive then all collections prior to the end date are removed.</p>
<example caption='Removing all collections before a date'><![CDATA[
<iq type='set' id='remove4'>
<remove xmlns='urn:xmpp:tmp:archive'
<remove xmlns='urn:xmpp:archive'
start='0000-01-01T00:00:00Z'
end='1469-07-21T04:00:00Z'/>
</iq>
]]></example>
<example caption='Removing all collections'><![CDATA[
<iq type='set' id='remove5'>
<remove xmlns='urn:xmpp:tmp:archive'/>
<remove xmlns='urn:xmpp:archive'/>
</iq>
]]></example>
<p>If the value of the optional 'open' attribute is set to 'true' then only collections that are currently being recorded automatically by the server (see <link url='#auto'>Automatic Archiving</link>) are removed.</p>
<example caption='Removing a collection being recorded by the server'><![CDATA[
<iq type='set' id='remove6'>
<remove xmlns='urn:xmpp:tmp:archive'
<remove xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
open='true'/>
</iq>
]]></example>
<example caption='Removing all collections being recorded by the server'><![CDATA[
<iq type='set' id='remove7'>
<remove xmlns='urn:xmpp:tmp:archive'
<remove xmlns='urn:xmpp:archive'
open='true'/>
</iq>
]]></example>
<p>If the specified collection (or collections) do not exist then the server MUST return an &notfound; error:</p>
<example caption='Unsuccessful reply'><![CDATA[
<iq type='error' to='romeo@montague.net/orchard' id='remove1'>
<remove xmlns='urn:xmpp:tmp:archive'
<remove xmlns='urn:xmpp:archive'
with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'/>
<error code='404' type='cancel'>
@ -1016,7 +1025,7 @@
<p>When requesting the list of modified collections, the client MUST embed appropriate <cite>Result Set Management</cite> data in the &lt;modified/&gt; element. The &lt;modified/&gt; element MUST include a 'start' attribute that specifies a UTC datetime (see <cite>XEP-0082</cite>) that it has previously received from the server or that it has determined locally (e.g., when synchronizing for the first time the client SHOULD choose a suitable time for the first page request, such as 1970-01-01T00:00:00Z).</p>
<example caption='Requesting a page of modifications'><![CDATA[
<iq type='get' id='sync1'>
<modified xmlns='urn:xmpp:tmp:archive'
<modified xmlns='urn:xmpp:archive'
start='1469-07-21T01:14:47Z'
version='3'/>
<set xmlns='http://jabber.org/protocol/rsm'>
@ -1028,7 +1037,7 @@
<p>The server MUST return the changed collections in the chronological order that they were changed (most recent last). If a collection has been modified, created, or removed <em>after</em> the time specified by the 'start' attribute, then the server MUST include it in the returned result set page of collections (unless the specified maximum page size would be exceeded). Each &lt;changed/&gt; or &lt;removed/&gt; collection element (for modified/created, or removed collections respectively) in the returned list MUST include the 'with' and 'start' attribues (and MAY include the 'exactmatch' attribute if that was specified in the request). The XML character data of the &lt;last/&gt; element is a unique, persistent identifier created by the server, which MUST be treated as opaque by the client.</p>
<example caption='Receiving a page of modifications'><![CDATA[
<iq type='result' to='romeo@montague.net/orchard' id='sync1'>
<modified xmlns='urn:xmpp:tmp:archive'>
<modified xmlns='urn:xmpp:archive'>
<changed with='juliet@capulet.com/chamber'
start='1469-07-21T02:56:15Z'
version='0'/>
@ -1047,7 +1056,7 @@
<p>Note: Along with its copy of the archive the client SHOULD save the most recent &lt;last/&gt; identifier that it received from the server. The next time it synchronizes with the server it SHOULD specify that identifier when requesting the first result set page by including it as the XML character data of the &lt;after/&gt; element in Result Set Management.</p>
<example caption='Requesting the next page of modifications'><![CDATA[
<iq type='get' id='sync2'>
<modified xmlns='urn:xmpp:tmp:archive'
<modified xmlns='urn:xmpp:archive'
start='1469-07-21T01:14:47Z'
version='3'/>
<set xmlns='http://jabber.org/protocol/rsm'>
@ -1071,7 +1080,7 @@
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<p>For each feature defined herein, if the server supports that feature it MUST return a &lt;feature/&gt; element with the 'var' attribute set to 'urn:xmpp:tmp:archive:name' &NSNOTE;, where 'name' is 'auto' for the <link url='#auto'>Automatic Archiving</link> feature, 'manage' for the <link url='#manage'>Archive Management</link> feature, 'manual' for the <link url='#manual'>Manual Archiving</link> feature, and 'pref' for the <link url='#pref'>Archiving Preferences</link> feature.</p>
<p>For each feature defined herein, if the server supports that feature it MUST return a &lt;feature/&gt; element with the 'var' attribute set to 'urn:xmpp:archive:[name]', where '[name]' is 'auto' for the <link url='#auto'>Automatic Archiving</link> feature, 'manage' for the <link url='#manage'>Archive Management</link> feature, 'manual' for the <link url='#manual'>Manual Archiving</link> feature, and 'pref' for the <link url='#pref'>Archiving Preferences</link> feature.</p>
<example caption='Server Service Discovery response'>
<![CDATA[
<iq from='montague.net'
@ -1080,11 +1089,11 @@
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
...
<feature var='urn:xmpp:tmp:archive'/>
<feature var='urn:xmpp:tmp:archive:auto'/>
<feature var='urn:xmpp:tmp:archive:manage'/>
<feature var='urn:xmpp:tmp:archive:manual'/>
<feature var='urn:xmpp:tmp:archive:pref'/>
<feature var='urn:xmpp:archive'/>
<feature var='urn:xmpp:archive:auto'/>
<feature var='urn:xmpp:archive:manage'/>
<feature var='urn:xmpp:archive:manual'/>
<feature var='urn:xmpp:archive:pref'/>
...
</query>
</iq>
@ -1108,12 +1117,15 @@
</section1>
<section1 topic='Stream Feature' anchor='streamfeature'>
<p>Although message archiving is not negotiated between a client and its server as part of stream negotiation, a server MAY advertise a stream feature of "urn:xmpp:tmp:archive" &NSNOTE; during stream setup (via the &lt;feature/&gt; element, which MUST NOT contain a &lt;required/&gt; child), and MUST do so if automatic archiving is on by default (if so, the &lt;feature/&gt; element MUST include a &lt;default/&gt; child).</p>
<p>Although message archiving is not negotiated between a client and its server as part of stream negotiation, a server MAY advertise a stream feature of "urn:xmpp:archive" during stream setup (via the &lt;feature/&gt; element, which MUST contain an empty &lt;optional/&gt; child), and MUST do so if automatic archiving is on by default (if so, the &lt;feature/&gt; element MUST include an empty &lt;default/&gt; child).</p>
<example caption='Stream Feature'><![CDATA[
<feature xmlns='urn:xmpp:tmp:archive'/>
<feature xmlns='urn:xmpp:archive'>
<optional/>
</feature>
]]></example>
<example caption='Stream Feature (Automatic Archiving on By Default)'><![CDATA[
<feature xmlns='urn:xmpp:tmp:archive'>
<feature xmlns='urn:xmpp:archive'>
<optional/>
<default/>
</feature>
]]></example>
@ -1137,15 +1149,15 @@
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespace' anchor='ns'>
<p>Until this specification advances to a status of Draft, its associated namespace shall be "urn:xmpp:tmp:archive"; upon advancement of this specification, the &REGISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;. The namespace "urn:xmpp:archive" is requested, and is thought to be unique per the XMPP Registrar's requirements.</p>
<p>The &REGISTRAR; includes "urn:xmpp:archive:data" in its registry of protocol namespaces (see &NAMESPACES;).</p>
</section2>
<section2 topic='Service Discovery Features' anchor='registrar-features'>
<p>The XMPP Registrar shall include the following features in its registry of service discovery features (see &DISCOFEATURES;), where the string "urn:xmpp:tmp:archive" shall be replaced with the URN issued by the XMPP Registrar:</p>
<p>The XMPP Registrar includes the following features in its registry of service discovery features (see &DISCOFEATURES;):</p>
<ul>
<li>urn:xmpp:tmp:archive:auto</li>
<li>urn:xmpp:tmp:archive:manage</li>
<li>urn:xmpp:tmp:archive:manual</li>
<li>urn:xmpp:tmp:archive:pref</li>
<li>urn:xmpp:archive:auto</li>
<li>urn:xmpp:archive:manage</li>
<li>urn:xmpp:archive:manual</li>
<li>urn:xmpp:archive:pref</li>
</ul>
</section2>
</section1>
@ -1156,10 +1168,17 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:tmp:archive'
xmlns='urn:xmpp:tmp:archive'
targetNamespace='urn:xmpp:archive'
xmlns='urn:xmpp:archive'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0136: http://www.xmpp.org/extensions/xep-0136.html
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>
The allowable root elements for the namespace defined
@ -1272,6 +1291,7 @@
<xs:element name='feature'>
<xs:complexType>
<xs:sequence>
<xs:element name='optional' minOccurs='1' maxOccurs='1'/>
<xs:element ref='default' minOccurs='0' maxOccurs='1'/>
</xs:sequence>
</xs:complexType>