<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Legacy Delayed Delivery</title>
  <abstract>This specification provides historical documentation of the legacy jabber:x:delay namespace, which has been deprecated in favor the urn:xmpp:delay namespace defined in XEP-0203.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>0091</number>
  <status>Obsolete</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>
  
  <author>
    <firstname>Peter</firstname>
    <surname>Saint-Andre</surname>
    <email>stpeter@stpeter.im</email>
    <jid>stpeter@jabber.org</jid>
    <uri>https://stpeter.im/</uri>
  </author>

  <revision>
    <version>1.4</version>
    <date>2009-05-27</date>
    <initials>psa</initials>
    <remark>Per a vote of the XMPP Council, changed status to Obsolete.</remark>
  </revision>
  <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 <span class="ref"><link url="https://xmpp.org/extensions/xep-0203.html">Delayed Delivery (XEP-0203)</link></span> <note>XEP-0203: Delayed Delivery &lt;<link url="https://xmpp.org/extensions/xep-0203.html">https://xmpp.org/extensions/xep-0203.html</link>&gt;.</note>.</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 <span class="ref"><link url="https://xmpp.org/extensions/xep-0203.html">Delayed Delivery (XEP-0203)</link></span> <note>XEP-0203: Delayed Delivery &lt;<link url="https://xmpp.org/extensions/xep-0203.html">https://xmpp.org/extensions/xep-0203.html</link>&gt;.</note>.</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><span class="ref"><link url="https://xmpp.org/extensions/xep-0082.html">XMPP Date and Time Profiles (XEP-0082)</link></span> <note>XEP-0082: XMPP Date and Time Profiles &lt;<link url="https://xmpp.org/extensions/xep-0082.html">https://xmpp.org/extensions/xep-0082.html</link>&gt;.</note> 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 <span class="ref"><link url="http://www.w3.org/TR/xmlschema11-2/">XML Schema Part 2</link></span> <note>XML Schema Part 2: Datatypes &lt;<link url="http://www.w3.org/TR/xmlschema11-2/">http://www.w3.org/TR/xmlschema11-2/</link>&gt;.</note>. 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 the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</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 <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note>.</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>
