<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
  <!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
  <title>Delayed Delivery</title>
  <abstract>This specification provides historical documentation of the jabber:x:delay namespace, which has been deprecated in favor the urn:xmpp:delay namespace defined in XEP-0203.</abstract>
  &LEGALNOTICE;
  <number>0091</number>
  <status>Deprecated</status>
  <type>Historical</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
  </dependencies>
  <supersedes/>
  <supersededby>
    <spec>XEP-0203</spec>
  </supersededby>
  <shortname>x-delay</shortname>
  <schemaloc>
    <url>http://www.xmpp.org/schemas/x-delay.xsd</url>
  </schemaloc>
  <expires>2007-12-31</expires>
  &stpeter;
  <revision>
    <version>1.3</version>
    <date>2007-03-29</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the XMPP Council, deprecated in favor of XEP-0203.</p></remark>
  </revision>
  <revision>
    <version>1.2</version>
    <date>2004-08-17</date>
    <initials>psa</initials>
    <remark><p>Specified that the timezone is to be understood as UTC; specified security considerations; corrected several small textual errors.</p></remark>
  </revision>
  <revision>
    <version>1.1</version>
    <date>2004-02-24</date>
    <initials>psa</initials>
    <remark><p>Corrected several small textual errors.</p></remark>
  </revision>
  <revision>
    <version>1.0</version>
    <date>2003-10-08</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, changed status to Active.</p></remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2003-05-22</date>
    <initials>psa</initials>
    <remark><p>Initial version.</p></remark>
  </revision>
</header>
<section1 topic='Introduction' anchor='intro'>
  <p class='note'>Note: This specification has been deprecated in favor of &xep0203;.</p>
  <p>This document provides canonical documentation of the 'jabber:x:delay' namespace, which was long used by Jabber applications to mark message or presence stanzas as delivered with a delay. This document is of historical importance only, since it has been deprecated in favor of <cite>XEP-0203</cite>.</p>
</section1>
<section1 topic='Protocol Definition' anchor='protocol'>
  <p>The 'jabber:x:delay' namespace is used to provide timestamp information about data stored for later delivery. The most common uses of this namespace are to stamp:</p>
  <ul>
    <li>A message that is sent to an offline entity and stored for later delivery.</li>
    <li>The last presence update sent by a connected node to a host.</li>
    <li>Messages cached by a multi-user chat room for delivery to new participants when they join the room.</li>
  </ul>
  <p>Information about the delivery delay is communicated by adding to the &lt;message/&gt; or &lt;presence/&gt; stanza one and only one &lt;x/&gt; child qualified by the 'jabber:x:delay' namespace. This information is added by the server or component that delivers the information. The following attributes are allowed on the &lt;x/&gt; element:</p>
  <ul>
    <li><cite>from</cite> -- The Jabber ID of the entity that originally sent the XML stanza or that delayed the delivery of the stanza (for example, the address of a multi-user chat room). This attribute is RECOMMENDED.</li>
    <li><cite>stamp</cite> -- The time when the XML stanza was originally sent. The format SHOULD be "CCYYMMDDThh:mm:ss" (see <link url="#time">A Note on Time Formats</link> below). This attribute is REQUIRED.</li>
  </ul>
  <p>In addition, the &lt;x/&gt; element MAY contain XML character data that provides a natural-language description of the reason for the delay.</p>
</section1>
<section1 topic='Examples' anchor='examples'>
  <example caption='Receiving a Message Sent While Offline'><![CDATA[
<message
    from='romeo@montague.net/orchard'
    to='juliet@capulet.com'
    type='chat'>
  <body>
    O blessed, blessed night! I am afeard.
    Being in night, all this is but a dream,
    Too flattering-sweet to be substantial.
  </body>
  <x xmlns='jabber:x:delay'
     from='capulet.com'
     stamp='20020910T23:08:25'>
    Offline Storage
  </x>
</message>
  ]]></example>
  <example caption='Receiving the Last Presence Update of Another Entity'><![CDATA[
<presence from='juliet@capulet.com/balcony' to='romeo@montague.net'>
  <status>anon!</status>
  <show>xa</show>
  <priority>1</priority>
  <x xmlns='jabber:x:delay'
     from='juliet@capulet.com/balcony'
     stamp='20020910T23:41:07'/>
</presence>
  ]]></example>
  <example caption='Receiving Cached Messages from a Conference Room'><![CDATA[
<message
    from='coven@macbeth.shakespeare.lit/secondwitch'
    to='macbeth@shakespeare.lit/laptop'
    type='groupchat'>
  <body>
    By the pricking of my thumbs,
    Something wicked this way comes.
    Open, locks,
    Whoever knocks!
  </body>
  <x xmlns='jabber:x:delay'
     from='coven@macbeth.shakespeare.lit'
     stamp='20020910T23:05:37'/>
</message>
  ]]></example>
</section1>
<section1 topic='A Note on Time Formats' anchor='time'>
  <p>&xep0082; defines the lexical representation of dates, times, and datetimes in Jabber protocols. Unfortunately, the 'jabber:x:delay' namespace predates that definition, and uses a datetime format ("CCYYMMDDThh:mm:ss") that is inconsistent with XEP-0082 and &w3xmlschema2;. Because a large base of deployed software uses the old format, this document specifies that applications using 'jabber:x:delay' SHOULD use the old format, not the format defined in XEP-0082. The timezone is be understood as UTC.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
  <p>Data qualified by the 'jabber:x:delay' can expose information about the sender's presence on the network at some time in the past. However, this introduces no new vulnerabilities, since the same information would have been available in real time.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
  <p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  <p>The 'jabber:x:delay' namespace is included in the protocol namespaces registry maintained by the &REGISTRAR;.</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>
  <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='jabber:x:delay'
    xmlns='jabber:x:delay'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-0091: http://www.xmpp.org/extensions/xep-0091.html

      NOTE: This protocol has been deprecated in favor of the 
            Delayed Delivery protocol specified in XEP-0203:
            http://www.xmpp.org/extensions/xep-0203.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='x'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute name='from' type='xs:string' use='optional'/>
          <xs:attribute name='stamp' type='xs:string' use='required'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

</xs:schema>
  ]]></code>
</section1>
</xep>
