| Abstract: | This document defines the format of Uniform Resource Identifiers (URIs) to identify nodes in the context of Publish-Subscribe services as well as items within the scope of such nodes. |
| Author: | Klaus Hartke |
| Copyright: | © 1999 - 2012 XMPP Standards Foundation. SEE LEGAL NOTICES. |
| Status: | ProtoXEP |
| Type: | Standards Track |
| Version: | 0.0.1 |
| Last Updated: | 2012-01-14 |
WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.
1. Introduction
2. Requirements
3. Syntax
4. Semantics
5. Examples
6. Security Considerations
7. IANA Considerations
8. XMPP Registrar Considerations
9. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Publish-Subscribe [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.
xmpp-pubsub-URI = "xmpp.pubsub:" [ "//" authxmpp "/" ] pubsub-path [ "?" query ]
pubsub-path = [ nodeid "@" ] host [ "/" [ pubsub-nodeid [ "/" [ pubsub-itemid ] ] ] ]
pubsub-nodeid = 1*( unreserved / pct-encoded / sub-delims )
pubsub-itemid = 1*( unreserved / pct-encoded / sub-delims )
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.
Example 1. A URI referring to a root node
xmpp.pubsub:pubsub.shakespeare.lit/
Example 2. A URI referring to a node
xmpp.pubsub:pubsub.shakespeare.lit/princely_musings/
Example 3. A URI referring to the meta-data of a node
xmpp.pubsub:pubsub.shakespeare.lit/princely_musings/?meta-data
Example 4. A URI referring to the last published item of a node
xmpp.pubsub:pubsub.shakespeare.lit/princely_musings/?last-item
Example 5. A URI referring to an item
xmpp.pubsub:pubsub.shakespeare.lit/princely_musings/ae890ac52d0df67ed7cfdf51b644e901
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.
Series: XEP
Number: xxxx
Publisher: XMPP Standards Foundation
Status:
ProtoXEP
Type:
Standards Track
Version: 0.0.1
Last Updated: 2012-01-14
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0060, RFC 3986
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED
This document in other formats:
XML
PDF
Email:
hartke@tzi.org
JabberID:
nx@jabber.org
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) 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 <http://xmpp.org/about/discuss.shtml> 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 <http://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 <http://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Initial draft.
(kh)END