XEP-0044: Full Namespace Support for XML Streams

Similar documents
XEP-0099: IQ Query Action Protocol

XEP-0087: Stream Initiation

XEP-0399: Client Key Support

XEP-0056: Business Data Interchange

XEP-0361: Zero Handshake Server to Server Protocol

XEP-0104: HTTP Scheme for URL Data

XEP-0052: File Transfer

XEP-0114: Jabber Component Protocol

XEP-0363: HTTP File Upload

XEP-0290: Encapsulated Digital Signatures in XMPP

XEP-0146: Remote Controlling Clients

XEP-0344: Impact of TLS and DNSSEC on Dialback

XEP-0140: Shared Groups

XEP-0333: Chat Markers

XEP-0206: XMPP Over BOSH

XEP-0133: Service Administration

XEP-0009: Jabber-RPC

XEP-0129: WebDAV File Transfers

XEP-0283: Moved. Tory Patnoe Version 0.1.1

XEP-0042: Jabber OOB Broadcast Service (JOBS)

XEP-0293: Jingle RTP Feedback Negotiation

XEP-0295: JSON Encodings for XMPP

XEP-0395: Atomically Compare-And-Publish PubSub Items

XEP-0135: File Sharing

XEP-0357: Push Notifications

XEP-0412: XMPP Compliance Suites 2019

XEP-0033: Extended Stanza Addressing

XEP-0341: Rayo CPA. Ben Langfeld Version 0.2

XEP-0289: Federated MUC for Constrained Environments

XEP-0059: Result Set Management

XEP-0011: Jabber Browsing

XEP-0171: Language Translation

XEP-0266: Codecs for Jingle Audio

XEP-0043: Jabber Database Access

XEP-0337: Event Logging over XMPP

XEP-0298: Delivering Conference Information to Jingle Participants (Coin)

XEP-0340: COnferences with LIghtweight BRIdging (COLIBRI)

XEP-0280: Message Carbons

XEP-0130: Waiting Lists

XEP-0060: Publish-Subscribe

XEP-0278: Jingle Relay Nodes

XEP-0050: Ad-Hoc Commands

X Generic Event Extension. Peter Hutterer

Additional License Authorizations for HPE OneView for Microsoft Azure Log Analytics

CA File Master Plus. Release Notes. Version

Bar Code Discovery. Administrator's Guide

XEP-0324: Internet of Things - Provisioning

ServerStatus Installation and Operation Manual

Open Source Used In Cisco Configuration Professional for Catalyst 1.0

MQ Port Scan Installation and Operation Manual

User Guide. Calibrated Software, Inc.

Splunk. Splunk. Deployment Guide

Ecma International Policy on Submission, Inclusion and Licensing of Software

Migration Tool. Migration Tool (Beta) Technical Note

XEP-0148: Instant Messaging Intelligence Quotient (IM IQ)

XEP-0322: Efficient XML Interchange (EXI) Format

Packet Trace Guide. Packet Trace Guide. Technical Note

VMware vcenter Log Insight Manager. Deployment Guide

Moodle. Moodle. Deployment Guide

Adobe Connect. Adobe Connect. Deployment Guide

git-pr Release dev2+ng5b0396a

Distributed Intelligent Capture. Integration Guide

Ecma International Policy on Submission, Inclusion and Licensing of Software

Feed Cache for Umbraco Version 2.0

Intel Stress Bitstreams and Encoder (Intel SBE) 2017 AVS2 Release Notes (Version 2.3)

Panasonic Audio Player 2 User Guide

LoadMaster VMware Horizon (with View) 6. Deployment Guide

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Technics Audio Player User Guide

Bar Code Discovery. Administrator's Guide

Epic. Epic Systems. Deployment Guide

XEP-0136: Message Archiving

IETF TRUST. Legal Provisions Relating to IETF Documents. February 12, Effective Date: February 15, 2009

KEMP Driver for Red Hat OpenStack. KEMP LBaaS Red Hat OpenStack Driver. Installation Guide

IETF TRUST. Legal Provisions Relating to IETF Documents. Approved November 6, Effective Date: November 10, 2008

AMS Device Manager. Planning and Installation Guide May Version 13.5 Planning and Installation Guide

Cloudera QuickStart VM

XEP-0284: Shared XML Editing

iwrite technical manual iwrite authors and contributors Revision: 0.00 (Draft/WIP)

RSA Two Factor Authentication

Altus Shared Data Experience (SDX)

HTNG Web Services Product Specification. Version 2011A

Hyper-V - Windows 2012 and 8. Virtual LoadMaster for Microsoft Hyper-V on Windows Server 2012, 2012 R2 and Windows 8. Installation Guide

NTLM NTLM. Feature Description

Release Information. Revision History. Version: build 018 Release Date: 23 rd November 2011

Simba Cassandra ODBC Driver with SQL Connector

Installing Your Microsoft Access Database (Manual Installation Instructions)

MCAFEE THREAT INTELLIGENCE EXCHANGE RESILIENT THREAT SERVICE INTEGRATION GUIDE V1.0

RTI Connext DDS Core Libraries

RTI Administration Console Release Notes

Getting Started with MTConnect: Architecture

AhnLab Software License Agreement

Sensor-fusion Demo Documentation

Inptools Manual. Steffen Macke

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

HTNG Web Services Product Specification. Version 2014A

MERIDIANSOUNDINGBOARD.COM TERMS AND CONDITIONS

Static analysis for quality mobile applications

Mile Terms of Use. Effective Date: February, Version 1.1 Feb 2018 [ Mile ] Mileico.com

Tailor Documentation. Release 0.1. Derek Stegelman, Garrett Pennington, and Jon Faustman

Transcription:

XEP-0044: Full Namespace Support for XML Streams Robert Norris mailto:rob@cataclysm.cx xmpp:rob@cataclysm.cx 2002-08-26 Version 0.1 Status Type Short Name Deferred Standards Track N/A A description of the use of namespaces within Jabber.

Legal Copyright This XMPP Extension Protocol is copyright 1999 2018 by the XMPP Standards Foundation (XSF). 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. Warranty ## NOTE WELL: This Specification is provided on an AS IS BASIS, WITHOUT WARRANTIES OR CONDI- TIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ## 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. 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 <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Contents 1 Introduction 1 2 Requirements and Protocol 1 3 Implementation Notes 4

2 REQUIREMENTS AND PROTOCOL 1 Introduction Jabber has traditionally supported a subset of the XML Namespaces specification 1. The protocol has been restricted to using specific namespace prefixes. This is convenient for client and server implementors, since they only need to check the element name to determine both the name and the context of the element. However, these restrictions mean that developers are unable to take advantage of some of the features that namespaces provide. Many developers have expressed an interest in having Jabber fully support namespaces - a desire which is likely to increase as time goes on. This support consists of allowing any namespace prefix to be used with any namespace, and also to allow namespace prefixes to be pre-declared on the stream root. This document outlines the semantics required for servers and clients to support namespaces fully, and also discusses implementation techniques and methods for providing compatibility with older fixed-prefix implementations. 2 Requirements and Protocol A typical XML stream is a pair of XML documents, one for each direction of communication between the two peers. An simple example of these might look like this: Listing 1: A typical XML stream SEND: < stream: stream xmlns = jabber: client SEND: <iq type = get <query xmlns = jabber:iq:version > <name >jsm </ name > <version >1.4.2 </ version > <os >Linux 2.4.19 </os > </ query > Note that there may also be additional namespaces specified in the stream header, to select or inform of various server features: 1 http://www.w3.org/tr/rec-xml-names 1

2 REQUIREMENTS AND PROTOCOL Listing 2: A typical XML stream with stream options SEND: < stream: stream xmlns = jabber: client xmlns:sasl = http: // www. iana.org / assignments /sasl - mechanisms xmlns:sasl = http: // www. iana.org / assignments /sasl - mechanisms < sasl: mechanisms > < sasl:mechanism >PLAIN </ sasl:mechanism > < sasl:mechanism >DIGEST -MD5 </ sasl:mechanism > < sasl: mechanism > EXTERNAL </ sasl: mechanism > </ sasl: mechanisms > SEND: <iq type = get <query xmlns = jabber:iq:version > <name >jsm </ name > <version >1.4.2 </ version > <os >Linux 2.4.19 </os > </ query > Currently, the prefix for each namespace is fixed; it cannot vary at all, since implementations use it for matching. The desire is to be able to use arbitrary prefixes: Listing 3: XML stream with arbitrary namespace prefixes (1) SEND: < stream xmlns: app = jabber: client xmlns = http: // etherx. jabber.org / streams RECV: < stream xmlns: app = jabber: client xmlns = http: // etherx. jabber.org / streams SEND: <app:iq type = get </ app:iq > RECV: <app:iq type = result from = jabber.org > <query xmlns = jabber:iq:version > <name >jsm </ name > <version >1.4.2 </ version > <os >Linux 2.4.19 </os > </ query > </ app:iq > 2

2 REQUIREMENTS AND PROTOCOL Also, since there exist streams in both directions, it should be possible for prefixes to differ between the two streams: Listing 4: XML stream with arbitrary namespace prefixes SEND: < stream xmlns: app = jabber: client xmlns = http: // etherx. jabber.org / streams SEND: <app:iq type = get </ app:iq > <ver:query xmlns:ver = jabber:iq:version > <ver:name >jsm </ ver:name > <ver:version >1.4.2 </ ver:version > <ver:os >Linux 2.4.19 </ ver:os > </ ver:query > Additionally, it should be possible to declare namespaces on the stream header so that they don t need to be declared later: Listing 5: XML stream with namespaces declared in the stream header SEND: < stream: stream xmlns = jabber: client xmlns:ver = jabber:iq:version xmlns:ver = jabber:iq:version SEND: <iq type = get <ver:query /> <ver:query > <ver:name >jsm </ ver:name > <ver:version >1.4.2 </ ver:version > <ver:os >Linux 2.4.19 </ ver:os > </ ver:query > And of course, any combinations of these should be valid, as long as they conform to the XML Namespaces specification. 3

3 IMPLEMENTATION NOTES 3 Implementation Notes In order to implement namespaces correctly, implementations will need to check both the namespace of an element (or attribute), and its namespace, in order to match it. An implementation will need to maintain some sort of mapping between prefixes and namespaces, though some parsers, such as recent versions of Expat, can do this for the implementor. Implementations should, wherever possible, adhere to the IETF maxim be liberal in what you accept, and conservative in what you send. This means accepting any valid namespace prefix, but using only the traditional prefixes (i.e. stream for http://etherx.jabber.org/streams, sasl for http://www.iana.org/assignments/sasl-mechanisms, and no prefix for the application namespace). For servers, this has the added benefit of getting compatibility with non-namespace-aware clients for free. In server components that may have to forward packets received from one stream to another stream, it may be necessary for the application namespace to be rewritten before the packet is forwarded. Examples of this are client-to-server and server-to-server components, which must convert jabber:client and jabber:server components, respectively, into jabber:component:accept packets before they are forwarded to the router. 4