Publish-Subscribe (XEP-0060) [1] is an XMPP protocol extension for generic publish-subscribe functionality. Several protocols use Uniform Resource Identifiers (URIs) to refer to data. By defining a URI scheme for pubsub data, the gap between these two worlds is bridged. The 'xmpp.pubsub' URI scheme defined here can be used to reference any node within the context of a specific pubsub service, or an item within the scope of a specific node.
Note: XEP-0060, Section 4.6.1, specifies the use of JIDs for addressing pubsub nodes, which in combination with the XMPP URI Scheme [2] already provides a way to generate URIs for these nodes. This, however, does not allow addressing nodes that are addressable as a JID plus node (see XEP-0060, Section 4.6.2), and also does not allow referring to the items published to nodes.
The URI scheme defined herein is designed to meet the following requirements:
The URI scheme follows the generic syntax from RFC 3986 [3] and is described using ABNF [4]. The "host", "query", "gen-delims", "sub-delims", "pct-encoded", "reserved" and "unreserved" rules are defined in RFC 3986, and the "authxmpp" and "nodeid" rule are defined in RFC 5122.
Unless specified in the URI, the authority ("authxmpp") is assumed to be locally known, and the NodeID ("pubsub-nodeid") to refer to the root node (i.e., the service itself).
A number of characters that can appear in an NodeID and ItemID MUST be percent-encoded in pubsub-nodeid and pubsub-itemid respectively. These are the characters that cannot appear in a URI according to RFC 3986 as well as "%" (because it is used for percent-encoding) and all the characters in the "gen-delims" set (i.e., ":", "/", "?", "#", "[", "]" and "@").
Note that this specification, like any URI scheme specification, does not define syntax or meaning of a fragment identifier (see RFC 3986, Section 3.5), because these depend on the type of a retrieved representation. The character "#" in pubsub-nodeid's and pubsub-itemid's MUST be escaped as %23.
Since the scheme conforms to the URI generic syntax; URIs of this scheme are normalized and compared according to the algorithm defined in RFC 3986, Section 6.
The scheme and host are case-insensitive and normally provided in lowercase; all other components are compared in a case-sensitive manner. Characters other than those in the "reserved" set are equivalent to their percent-encoded octets (see RFC 3986, Section 2.1): the normal form is to not encode them. Non-ASCII characters can be encoded according to UTF-8 [5], and then each octet of the corresponding UTF-8 sequence is percent-encoded to be represented as URI characters.
If no NodeID and no ItemID is specified, the slash character after host is OPTIONAL. Likewise, if a NodeID but no ItemID is specified, the slash character after pubsub-nodeid is OPTIONAL. The normal form is to provide the slash character in either case.
An 'xmpp.pubsub' URI designates a node within the context of a specific pubsub service, or an item within the scope of a node. A publish-subscribe service is an XMPP server or component that adheres to the protocol defined in XEP-0060. A node is a location to which information can be published and from which event notifications and/or payloads can be received. Nodes are uniquely identified by a NodeID within the context of a particular pubsub service. An item is an XML fragment which is published to a node, thereby generating an event. Items are uniquely identified by an ItemID within the scope of a node.
An application that processes an 'xmpp.pubsub' URI reconstructs the encapsulated XMPP address, NodeID and optionally ItemID, connects to an appropriate XMPP server, and sends an appropriate XMPP "stanza" (XML fragment) with the NodeID and ItemID to the XMPP address. The set of possible operations is defined in XEP-0060.
The query component provides a way to refer more specifically to data associated with the target. Possible values for URIs referring to nodes are: "meta-data" and "last-item".
If an authority ("authxmpp") is given in the URI string, this indicates the user the application should connect as. Otherwise, the application should connect as the default user.
TODO.
This document requests the registration of the Uniform Resource Identifier (URI) scheme 'xmpp.pubsub' with the Internet Assigned Numbers Authority (IANA) [6]. The registration request complies with RFC 4395 [7].
No namespaces or parameters need to be registered with the XMPP Registrar [8] as a result of this document.
Some text in this document was borrowed or adapted from RFC 3986, RFC 5122 and XEP-0060.
This work was funded by Intel.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).
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.
## 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. ##
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.
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 <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.
Given that this XMPP Extension Protocol normatively references IETF technologies, discussion on the <xsf-ietf@xmpp.org> list might also be appropriate.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0060: Publish-Subscribe <https://xmpp.org/extensions/xep-0060.html>.
2. Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP) <http://tools.ietf.org/html/rfc5122>.
3. RFC 3986: Uniform Resource Identifiers (URI): Generic Syntax <http://tools.ietf.org/html/rfc3986>.
4. RFC 5234: Augmented BNF for Syntax Specifications: ABNF <http://tools.ietf.org/html/rfc5234>.
5. RFC 3629: UTF-8, a transformation format of ISO 10646 <http://tools.ietf.org/html/rfc3629>.
6. 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 <http://www.iana.org/>.
7. RFC 4395: Guidelines and Registration Procedures for New URI Schemes <http://tools.ietf.org/html/rfc4395>.
8. 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 <https://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/
Initial draft.
@report{hartke2012xepxxxx, title = {The 'xmpp.pubsub' URI Scheme}, author = {Hartke, Klaus}, type = {XEP}, number = {xxxx}, version = {0.0.1}, institution = {XMPP Standards Foundation}, url = {https://xmpp.org/extensions/xep-xxxx.html}, date = {2012-01-14/2012-01-14}, }
END