<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Jabber URI Scheme</title>
  <abstract>A URI scheme for Jabber communications.</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>0032</number>
  <status>Retracted</status>
  <type>Standards Track</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies/>
  <supersedes/>
  <supersededby><spec>RFC 5122</spec></supersededby>
  <shortname>N/A</shortname>
  
  <author>
    <firstname>Peter</firstname>
    <surname>Saint-Andre</surname>
    <email>stpeter@stpeter.im</email>
    <jid>stpeter@jabber.org</jid>
    <uri>https://stpeter.im/</uri>
  </author>

  
  <author>
    <firstname>Peter</firstname>
    <surname>Millard</surname>
    <authornote/>
  </author>

  <revision>
    <version>0.4</version>
    <date>2003-09-02</date>
    <initials>psa</initials>
    <remark>Retracted the document, since it is superseded by draft-ietf-xmpp-uri, an Internet-Draft produced by the IETF's XMPP WG.</remark>
  </revision>
  <revision>
    <version>0.3</version>
    <date>2002-10-16</date>
    <initials>psa</initials>
    <remark>Changed 'jabber:' scheme to 'xmpp:' scheme; further specified use cases; removed references to official Jabber namespaces.</remark>
  </revision>
  <revision>
    <version>0.2</version>
    <date>2002-05-10</date>
    <initials>psa</initials>
    <remark>Added information about syntax, allowable characters, and potential conflict with official Jabber namespaces.</remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2002-05-08</date>
    <initials>psa</initials>
    <remark>Initial version.</remark>
  </revision>
</header>
<section1 topic="Introduction">
  <p><em>Note: This document has been superseded by <span class="ref"><link url="http://tools.ietf.org/html/rfc5122">RFC 5122</link></span> <note>RFC 5122: Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP) &lt;<link url="http://tools.ietf.org/html/rfc5122">http://tools.ietf.org/html/rfc5122</link>&gt;.</note>.</em></p>
  <p>It is widely acknowledged that it would be good to be able to express a Jabber Identifier (JID) (see <span class="ref"><link url="https://xmpp.org/extensions/xep-0029.html">Definition of Jabber Identifiers (XEP-0029)</link></span> <note>XEP-0029: Definition of Jabber Identifiers &lt;<link url="https://xmpp.org/extensions/xep-0029.html">https://xmpp.org/extensions/xep-0029.html</link>&gt;.</note>) as a Uniform Resource Identifier (see <span class="ref"><link url="http://tools.ietf.org/html/rfc3986">RFC 3986</link></span> <note>RFC 3986: Uniform Resource Identifiers (URI): Generic Syntax &lt;<link url="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</link>&gt;.</note>). In addition, there would be value in being able to interact with a JID through a URI scheme (e.g., by sending a message or a presence update).</p>
  <p>Although XMPP enables a wide range of functionality, the authors propose that a Jabber URI scheme needs to support only a limited subset of the possible Jabber functionality. In particular, we see the following as core functions that need to be supported:</p>
  <ul>
    <li>Sending of basic messages</li>
    <li>Sending of basic presence</li>
    <li>Sending of subscription requests</li>
  </ul>
</section1>
<section1 topic="Syntax">
  <p>The syntactic components of a Jabber URI are as follows:</p>
  <code>&lt;xmpp&gt;:[&lt;node-identifier&gt;@]&lt;domain-identifier&gt;[?&lt;query&gt;]</code>
  <p>This scheme is similar to the mailto URI scheme <note>The mailto URI scheme is described in RFC 2368: <link url="http://www.ietf.org/rfc/rfc2368.txt">http://www.ietf.org/rfc/rfc2368.txt</link>.</note>. One similarity is that a Jabber URI is, in the terminology of RFC 3986, not hierarchical but opaque. A URI that is hierarchical in nature uses the slash ("/") character in order to separate hierarchical components, as is familiar from HTTP and FTP URIs. By contrast, an opaque URI such as a mailto URI contains only the scheme (e.g., 'mailto'), a colon, an address (e.g., 'user@host'), and an optional query component.</p>
  <p>Per the JID definition in XEP-0029, the node identifier is optional (i.e., a mere domain identifier is a valid JID). However, the proposed Jabber URI scheme forbids the inclusion of a resource identifier in the JID, even though XEP-0029 defines this as valid. This is partly because the authors see no compelling reason to include a resource identifier in the Jabber URI scheme, and also because including a resource would necessitate the inclusion of a slash character in an opaque URI, which is contrary to RFC 3986. Finally, the query component is optional.</p>
</section1>
<section1 topic="URI Characters and Escape Sequences">
  <p>RFC 3986 limits the characters included in a URI to US-ASCII characters, and further defines a number of US-ASCII characters as reserved or otherwise excluded. Reserved characters are special characters used as delimiters withing URIs and whose usage is limited to their reserved purpose as defined in RFC 3986 or a specific URI scheme. Excluded characters are control characters, spaces, and other common (non-URI-specific) delimiters such as angle brackets, double quotes, the number sign, and the percent sign. Reserved characters must be escaped if their usage in a specific context would conflict with their reserved purpose, and excluded characters must always be escaped. The set of disallowed charaacters for any specific URI component consists of the reserved and excluded characters for that component. These are defined below for each component of a Jabber URI.</p>
  <section2 topic="Scheme Component">
    <p>The scheme component for a Jabber URI is 'xmpp'. This component is delimited from the remainder of the URI by a colon character (':').</p>
  </section2>
  <section2 topic="Node Identifier Component">
    <p>The node identifier component of a Jabber URI is equivalent to the "userinfo" component of a generic URI. Section 2.3 of XEP-0029 stipulates that a node identifier may contain any Unicode character higher than #x20 with the exception of the following:</p>
    <code>#x22 (") | #x26 (&amp;) | #x27 (') | #x2F (/) |
#x3A (:) | #x3C (&lt;) | #x3E (&gt;) | #x40 (@) |
#x7F (del) | #xFFFE (BOM) | #xFFFF (BOM)</code>
    <p>In addition, Section 2.2 of RFC 3986 stipulates that the following additional characters are reserved:</p>
    <code>#x24 ($) | #x2B (+) | #x2C (,) | #x3B (;) | #x3D (=) | #x3F (?)</code>
    <p>Section 2.4.3 of RFC 3986 further stipulates that the following characters are excluded from URIs in their unescaped form:</p>
    <code>#x23 (#) | #x25 (%)</code>
    <p>Finally, because the generic URI syntax does not provide a way to specify a character encoding other than US-ASCII (see Section 2.1 of RFC 3986), the characters in the node identifier component of a Jabber URI must contain only US-ASCII characters.</p>
    <p>Therefore, in order to ensure that a Jabber URI containing a node identifier is a valid URI, the characters disallowed by RFC 3986 (reserved, excluded, and non-ASCII characters) must be escaped in the node identifier component of a Jabber URI.</p>
  </section2>
  <section2 topic="Domain Identifier Component">
    <p>A domain identifier is a standard DNS hostname as specified in RFC 952 <note><link url="http://www.ietf.org/rfc/rfc952.txt">http://www.ietf.org/rfc/rfc952.txt</link></note>.</p>
  </section2>
  <section2 topic="Query Component">
    <p>The query component of a Jabber URI may contain any US-ASCII character higher than #x20 with the exception of the following:</p>
    <code>#x22 (") | #x23 (#) | #x24 ($) | #x25 (%) |
#x26 (&amp;) | #x27 (') | #x2B (+) | #x2C (,) |
#x2F (/) | #x3A (:) | #x3B (;) | #x3C (&lt;) |
#x3D (=) | #x3E (&gt;) | #x3F (?) | #x40 (@) |
#x7F (del) | #xFFFE (BOM) | #xFFFF (BOM)</code>
  </section2>
</section1>
<section1 topic="Use Cases">
    <p>Thus the most basic Jabber URI is user@host (sometimes referred to as a "bare JID") prepended by 'xmpp:', as shown in the following example.</p>
    <code>
xmpp:user@host
    </code>
    <p>A URI containing bare JID and no query component should trigger an application to present a user with an appropriate interface to complete an action such as sending a message, sending presence, or managing a subscription. In order to make this possible, some basic queries must be included in the protocol.</p>
    <p>The authors propose three allowable query types in a Jabber URI: message, presence, and subscribe <note>These query types are URI queries as defined in RFC 3986 and are not to be confused with the &lt;query/&gt; element often included as the child of an &lt;iq/&gt; element in XMPP.</note>. These three basic URIs are described below by way of use cases.</p>
  <section2 topic="Sending a Message">
    <p>If no parameters are passed along with the message query type, an application should present a user with an appropriate interface to complete the sending of a message.</p>
    <example caption="Invoking an Interface to Send a Message to a JID">
xmpp:user@host?message
    </example>
    <p>The query component may include parameters that further specify the message to be sent to the intended recipient. The following parameters are allowed:</p>
    <ul>
      <li>body</li>
      <li>subject</li>
      <li>thread (for conversation tracking)</li>
    </ul>
    <example caption="Sending a Message with a Subject, Body, and Thread">
xmpp:user@host?message&amp;subject=hi&amp;body=Hello%20World&amp;thread=abc123
    </example>
  </section2>
  <section2 topic="Sending Presence">
    <p>If no parameters are passed along with the presence query type, an application should present a user with an appropriate interface to complete the act of sending presence.</p>
    <example caption="Invoking an Interface to Send Presence to a JID">
xmpp:user@host?presence
    </example>
    <p>The query component may include parameters that further specify the presence to be sent to the intended recipient (e.g., a user-defined status message). The following parameters are allowed:</p>
    <ul>
      <li>type ('unavailable'; if not specified, the sender is defined to be online and available)</li>
      <li>show (one of 'away', 'xa', 'dnd', or 'chat')</li>
      <li>status (user-defined status message)</li>
      <li>priority (a non-negative integer, with zero as the lowest priority)</li>
    </ul>
    <example caption="Sending a Specific Presence">
xmpp:user@host?presence&amp;show=dnd&amp;status=taking%20a%20nap
    </example>
  </section2>
  <section2 topic="Managing Subscriptions">
    <p>If no parameters are passed along with the subscribe query type, an application should present a user with an appropriate interface to complete the subscription request.</p>
    <example caption="Invoking an Interface to Send a Subscription Request to a JID">
xmpp:user@host?subscribe
    </example>
    <p>The query component may include parameters that further specify the subscription request to be sent to the intended recipient. Only the 'type' parameter is deemed useful in the limited Jabber URI spec, with valid values of 'subscribe', 'subscribed', 'unsubscribe', or 'unsubscribed'.</p>
    <example caption="Sending a Subscription Request">
xmpp:user@host?subscribe&amp;type=subscribe
    </example>
    <example caption="Accepting a Subscription Request">
xmpp:user@host?subscribe&amp;type=subscribed
    </example>
    <example caption="Unsubscribing from Another User's Presence">
xmpp:user@host?subscribe&amp;type=unsubscribe
    </example>
    <example caption="Cancelling Another User's Subscription to Your Presence">
xmpp:user@host?subscribe&amp;type=unsubscribed
    </example>
  </section2>
</section1>
<section1 topic="Author Note" anchor="authornote">
  <p>Peter Millard, co-author of this specification from version 0.1 through version 0.4, died on April 26, 2006.</p>
</section1>
</xep>
