draft-ietf-xmpp-core-02.txt   draft-ietf-xmpp-core-03.txt 
Network Working Group P. Saint-Andre Network Working Group P. Saint-Andre
Internet-Draft J. Miller Internet-Draft J. Miller
Expires: August 4, 2003 Jabber Software Foundation Expires: August 22, 2003 Jabber Software Foundation
February 03, 2003 February 21, 2003
XMPP Core XMPP Core
draft-ietf-xmpp-core-02 draft-ietf-xmpp-core-03
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. all provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
skipping to change at page 1, line 32 skipping to change at page 1, line 32
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at http:// The list of current Internet-Drafts can be accessed at http://
www.ietf.org/ietf/1id-abstracts.txt. www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on August 4, 2003. This Internet-Draft will expire on August 22, 2003.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved. Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract Abstract
This document describes the core features of the eXtensible Messaging This document describes the core features of the eXtensible Messaging
and Presence Protocol (XMPP), a protocol for streaming XML in near- and Presence Protocol (XMPP), a protocol for streaming XML in near-
real-time that is used mainly for the purpose of instant messaging real-time that is used mainly for the purpose of instant messaging
skipping to change at page 2, line 30 skipping to change at page 2, line 30
3.2 Domain Identifier . . . . . . . . . . . . . . . . . . . . . 7 3.2 Domain Identifier . . . . . . . . . . . . . . . . . . . . . 7
3.3 Node Identifier . . . . . . . . . . . . . . . . . . . . . . 7 3.3 Node Identifier . . . . . . . . . . . . . . . . . . . . . . 7
3.4 Resource Identifier . . . . . . . . . . . . . . . . . . . . 8 3.4 Resource Identifier . . . . . . . . . . . . . . . . . . . . 8
4. XML Streams . . . . . . . . . . . . . . . . . . . . . . . . 9 4. XML Streams . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 Stream Attributes . . . . . . . . . . . . . . . . . . . . . 10 4.3 Stream Attributes . . . . . . . . . . . . . . . . . . . . . 10
4.4 Namespace Declarations . . . . . . . . . . . . . . . . . . . 11 4.4 Namespace Declarations . . . . . . . . . . . . . . . . . . . 11
4.5 Stream Features . . . . . . . . . . . . . . . . . . . . . . 12 4.5 Stream Features . . . . . . . . . . . . . . . . . . . . . . 12
4.6 Stream Errors . . . . . . . . . . . . . . . . . . . . . . . 12 4.6 Stream Errors . . . . . . . . . . . . . . . . . . . . . . . 12
4.7 Simple Streams Example . . . . . . . . . . . . . . . . . . . 13 4.7 Simple Streams Example . . . . . . . . . . . . . . . . . . . 14
5. Stream Authentication . . . . . . . . . . . . . . . . . . . 15 5. Stream Authentication . . . . . . . . . . . . . . . . . . . 16
5.1 SASL Authentication . . . . . . . . . . . . . . . . . . . . 15 5.1 SASL Authentication . . . . . . . . . . . . . . . . . . . . 16
5.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.1.2 Client-Server Example . . . . . . . . . . . . . . . . . . . 16 5.1.2 Client-Server Example . . . . . . . . . . . . . . . . . . . 17
5.2 Dialback Authentication . . . . . . . . . . . . . . . . . . 18 5.2 Dialback Authentication . . . . . . . . . . . . . . . . . . 19
5.2.1 Dialback Protocol . . . . . . . . . . . . . . . . . . . . . 20 5.2.1 Dialback Protocol . . . . . . . . . . . . . . . . . . . . . 21
6. Stream Encryption . . . . . . . . . . . . . . . . . . . . . 23 6. Stream Encryption . . . . . . . . . . . . . . . . . . . . . 24
6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.2 Client-Server Example . . . . . . . . . . . . . . . . . . . 24 6.2 Client-Server Example . . . . . . . . . . . . . . . . . . . 25
6.3 Certificate-Based Authentication . . . . . . . . . . . . . . 25 6.3 Certificate-Based Authentication . . . . . . . . . . . . . . 26
7. XML Stanzas . . . . . . . . . . . . . . . . . . . . . . . . 26 7. XML Stanzas . . . . . . . . . . . . . . . . . . . . . . . . 27
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.2 Common Attributes . . . . . . . . . . . . . . . . . . . . . 26 7.2 Common Attributes . . . . . . . . . . . . . . . . . . . . . 27
7.2.1 to . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.2.1 to . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.2.2 from . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.2.2 from . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.2.3 id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.2.3 id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.2.4 type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.2.4 type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.2.5 xml:lang . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.2.5 xml:lang . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.3 Message Stanzas . . . . . . . . . . . . . . . . . . . . . . 27 7.3 Message Stanzas . . . . . . . . . . . . . . . . . . . . . . 28
7.3.1 Types of Message . . . . . . . . . . . . . . . . . . . . . . 27 7.3.1 Types of Message . . . . . . . . . . . . . . . . . . . . . . 28
7.3.2 Children . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7.3.2 Children . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.4 Presence Stanzas . . . . . . . . . . . . . . . . . . . . . . 29 7.4 Presence Stanzas . . . . . . . . . . . . . . . . . . . . . . 30
7.4.1 Types of Presence . . . . . . . . . . . . . . . . . . . . . 29 7.4.1 Types of Presence . . . . . . . . . . . . . . . . . . . . . 30
7.4.2 Children . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.4.2 Children . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.5 IQ Stanzas . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.5 IQ Stanzas . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.5.2 Types of IQ . . . . . . . . . . . . . . . . . . . . . . . . 32 7.5.2 Types of IQ . . . . . . . . . . . . . . . . . . . . . . . . 33
7.5.3 Children . . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.5.3 Children . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.6 Extended Namespaces . . . . . . . . . . . . . . . . . . . . 33 7.6 Extended Namespaces . . . . . . . . . . . . . . . . . . . . 34
8. XML Usage within XMPP . . . . . . . . . . . . . . . . . . . 34 8. XML Usage within XMPP . . . . . . . . . . . . . . . . . . . 35
8.1 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.1 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.2 Validation . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.2 Validation . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.3 Character Encodings . . . . . . . . . . . . . . . . . . . . 34 8.3 Character Encodings . . . . . . . . . . . . . . . . . . . . 35
8.4 Inclusion of Text Declaration . . . . . . . . . . . . . . . 34 8.4 Inclusion of Text Declaration . . . . . . . . . . . . . . . 35
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . 35 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . 36
10. Internationalization Considerations . . . . . . . . . . . . 36 10. Internationalization Considerations . . . . . . . . . . . . 37
11. Security Considerations . . . . . . . . . . . . . . . . . . 37 11. Security Considerations . . . . . . . . . . . . . . . . . . 38
11.1 Client-to-Server Communications . . . . . . . . . . . . . . 37 11.1 Client-to-Server Communications . . . . . . . . . . . . . . 38
11.2 Server-to-Server Communications . . . . . . . . . . . . . . 37 11.2 Server-to-Server Communications . . . . . . . . . . . . . . 38
11.3 Minimum Security Mechanisms . . . . . . . . . . . . . . . . 37 11.3 Minimum Security Mechanisms . . . . . . . . . . . . . . . . 38
11.4 Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . 38 11.4 Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . 39
References . . . . . . . . . . . . . . . . . . . . . . . . . 39 References . . . . . . . . . . . . . . . . . . . . . . . . . 40
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 41 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 42
A. Standard Error Codes . . . . . . . . . . . . . . . . . . . . 42 A. Standard Error Codes . . . . . . . . . . . . . . . . . . . . 43
B. Formal Definitions . . . . . . . . . . . . . . . . . . . . . 44 B. XML Schemas . . . . . . . . . . . . . . . . . . . . . . . . 46
B.1 streams namespace . . . . . . . . . . . . . . . . . . . . . 44 B.1 streams namespace . . . . . . . . . . . . . . . . . . . . . 46
B.1.1 DTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 B.2 SASL namespace . . . . . . . . . . . . . . . . . . . . . . . 47
B.1.2 Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 B.3 Dialback namespace . . . . . . . . . . . . . . . . . . . . . 47
B.2 SASL namespace . . . . . . . . . . . . . . . . . . . . . . . 45 B.4 jabber:client namespace . . . . . . . . . . . . . . . . . . 48
B.2.1 DTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 B.5 jabber:server namespace . . . . . . . . . . . . . . . . . . 51
B.2.2 Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 C. Revision History . . . . . . . . . . . . . . . . . . . . . . 55
B.3 jabber:client namespace . . . . . . . . . . . . . . . . . . 47 C.1 Changes from draft-ietf-xmpp-core-02 . . . . . . . . . . . . 55
B.3.1 DTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 C.2 Changes from draft-ietf-xmpp-core-01 . . . . . . . . . . . . 55
B.3.2 Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 C.3 Changes from draft-ietf-xmpp-core-00 . . . . . . . . . . . . 55
B.4 jabber:server namespace . . . . . . . . . . . . . . . . . . 51 C.4 Changes from draft-miller-xmpp-core-02 . . . . . . . . . . . 55
B.4.1 DTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Full Copyright Statement . . . . . . . . . . . . . . . . . . 57
B.4.2 Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
C. Revision History . . . . . . . . . . . . . . . . . . . . . . 56
C.1 Changes from draft-ietf-xmpp-core-01 . . . . . . . . . . . . 56
C.2 Changes from draft-ietf-xmpp-core-00 . . . . . . . . . . . . 56
C.3 Changes from draft-miller-xmpp-core-02 . . . . . . . . . . . 56
Full Copyright Statement . . . . . . . . . . . . . . . . . . 58
1. Introduction 1. Introduction
1.1 Overview 1.1 Overview
The eXtensible Messaging and Presence Protocol (XMPP) is an open XML The eXtensible Messaging and Presence Protocol (XMPP) is an open XML
[1] protocol for near-real-time messaging and presence. The protocol [1] protocol for near-real-time messaging, presence, and request-
was developed originally within the Jabber community starting in response services. The protocol was developed originally within the
1998, and since 2001 has continued to evolve under the auspices of Jabber community starting in 1998, and since 2001 has continued to
the Jabber Software Foundation and now the XMPP WG. Currently, there evolve under the auspices of the Jabber Software Foundation and now
exist multiple implementations of the protocol, mostly offered under the XMPP WG. Currently, there exist multiple implementations of the
the name of Jabber. In addition, there are countless deployments of protocol, mostly offered under the name of Jabber. In addition,
these implementations, which provide instant messaging (IM) and there are countless deployments of these implementations, which
presence services at and among tens of thousands of domains to a user provide instant messaging (IM) and presence services at and among
base that is estimated at over five million end users. The current tens of thousands of domains to a user base that is estimated at over
document defines the core features of XMPP; XMPP IM [2] defines the five million end users. The current document defines the core
extensions necessary to provide basic instant messaging and presence features of XMPP; XMPP IM [2] defines the extensions necessary to
functionality that addresses the requirements defined in RFC 2779 provide basic instant messaging and presence functionality that
[3]. addresses the requirements defined in RFC 2779 [3].
1.2 Terminology 1.2 Terminology
The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in RFC "OPTIONAL" in this document are to be interpreted as described in RFC
2119 [4]. 2119 [4].
1.3 Discussion Venue 1.3 Discussion Venue
skipping to change at page 6, line 9 skipping to change at page 6, line 9
the contact list for each IM user); in this case, the XML data is the contact list for each IM user); in this case, the XML data is
processed directly by the server itself on behalf of the client and processed directly by the server itself on behalf of the client and
is not routed to another entity. Compliant server implementations is not routed to another entity. Compliant server implementations
MUST ensure in-order processing of XML stanzas received from MUST ensure in-order processing of XML stanzas received from
connected clients, servers, and services. connected clients, servers, and services.
2.3 Client 2.3 Client
Most clients connect directly to a server over a TCP socket and use Most clients connect directly to a server over a TCP socket and use
XMPP to take full advantage of the functionality provided by a server XMPP to take full advantage of the functionality provided by a server
and any associated services. (Clients on foreign messaging networks and any associated services, although it must be noted that there is
may also be part of the architecture, made accessable via a gateway no necessary coupling of an XML stream to a TCP socket (e.g., a
to that network.) Multiple resources (e.g., devices or locations) MAY client COULD connect via HTTP polling or some other mechanism).
connect simultaneously to a server on behalf of each authorized Multiple resources (e.g., devices or locations) MAY connect
client, with each resource connecting over a discrete TCP socket and simultaneously to a server on behalf of each authorized client, with
each resource connecting over a discrete TCP socket and
differentiated by the resource identifier of a JID (Section 3) (e.g., differentiated by the resource identifier of a JID (Section 3) (e.g.,
user@domain/home vs. user@domain/work). The port assigned by the user@domain/home vs. user@domain/work). The port assigned by the
IANA [6] for connections between a Jabber client and a Jabber server IANA [6] for connections between a Jabber client and a Jabber server
is 5222. For further details about client-to-server communications is 5222. For further details about client-to-server communications
expressly for the purpose of instant messaging and presence, refer to expressly for the purpose of instant messaging and presence, refer to
XMPP IM [2]. XMPP IM [2].
2.4 Gateway 2.4 Gateway
A gateway is a special-purpose server-side service whose primary A gateway is a special-purpose server-side service whose primary
skipping to change at page 12, line 50 skipping to change at page 12, line 50
negotiated for the stream. Currently this is used for SASL and TLS negotiated for the stream. Currently this is used for SASL and TLS
negotiation only, but it could be used for other negotiable features negotiation only, but it could be used for other negotiable features
in the future (examples are shown under Stream Authentication in the future (examples are shown under Stream Authentication
(Section 5) below). If an entity does not understand or support some (Section 5) below). If an entity does not understand or support some
features, it SHOULD ignore them. features, it SHOULD ignore them.
4.6 Stream Errors 4.6 Stream Errors
The root stream element MAY contain an error child element (e.g., The root stream element MAY contain an error child element (e.g.,
<stream:error/> if the stream namespace prefix is 'stream'). The <stream:error/> if the stream namespace prefix is 'stream'). The
error child SHOULD be sent by a Jabber entity (usually a server error child MUST be sent by a Jabber entity (usually a server rather
rather than a client) if it perceives that a stream-level error has than a client) if it perceives that a stream-level error has
occurred. Examples include the sending of invalid XML, the shutdown occurred. Examples of error conditions include the sending of
of a server, an internal server error such as the shutdown of a invalid XML, the shutdown of a server, an internal server error such
session manager, and an attempt by a client to authenticate as the as the shutdown of a session manager, and inclusion of an unsupported
same resource that is currently connected. If an error occurs at the version number in the initiating stream header. It is assumed that
level of the stream, the entity (initiating entity or receiving all stream-level errors are unrecoverable; therefore, if an error
entity) that detects the error SHOULD send a stream error to the occurs at the level of the stream, the entity that detects the error
other entity specifying why the streams are being closed and then MUST send a stream error to the other entity and then send a closing
send a closing </stream> tag. XML of the following form is sent </stream> tag. Specifically, XML of the following form is sent
within the context of an existing stream: within the context of an existing stream (the error element MUST
possess the 'code' attribute and MAY include CDATA):
<stream:stream ...> <stream:stream ...>
... ...
<stream:error> <stream:error code='400'>
Error message (e.g., "Invalid XML") Optional text description (e.g., "Bad XML")
</stream:error> </stream:error>
</stream:stream> </stream:stream>
If the error occurs while the stream is being set up, the receiving
entity MUST still send the opening and closing stream tags and
include the error element as a child of the stream element. The
following example illustrates this principle (where the "C" lines are
sent from the client to the server, and the "S" lines are sent from
the server to the client):
C: <stream:stream
to='somedomain'
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
version='bad.version'>
S: <stream:stream
from='somedomain'
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
version='1.0'>
S: <stream:error code='505'/>
S: </stream:stream>
If the initiating entity provides an unknown host in the 'to'
attribute (or provides no 'to' attribute at all), the server SHOULD
provide the server's authoritative hostname in the 'from' attribute
of the stream header.
The following codes are defined for stream-level errors:
o 302 - Redirect
o 400 - Bad XML
o 404 - Unknown Host
o 410 - Gone
o 500 - Internal Server Error
o 505 - Version Not Supported
If the error is 302 ("Redirect"), the server SHOULD include CDATA
specifying the alternate hostname or IP address to which the
initiating entity may attempt to connect.
4.7 Simple Streams Example 4.7 Simple Streams Example
The following is a stream-based session of a client on a server The following is a stream-based session of a client on a server
(where the "C" lines are sent from the client to the server, and the (where the "C" lines are sent from the client to the server, and the
"S" lines are sent from the server to the client): "S" lines are sent from the server to the client):
A basic session: A basic session:
C: <?xml version='1.0'?> C: <?xml version='1.0'?>
<stream:stream <stream:stream
skipping to change at page 14, line 46 skipping to change at page 15, line 44
xmlns:stream='http://etherx.jabber.org/streams' xmlns:stream='http://etherx.jabber.org/streams'
version='1.0'> version='1.0'>
S: <?xml version='1.0'?> S: <?xml version='1.0'?>
<stream:stream <stream:stream
from='server' from='server'
id='id_123456789' id='id_123456789'
xmlns='jabber:client' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' xmlns:stream='http://etherx.jabber.org/streams'
version='1.0'> version='1.0'>
C: <message><body>Bad XML, no closing body tag!</message> C: <message><body>Bad XML, no closing body tag!</message>
S: <stream:error>Invalid XML</stream:error> S: <stream:error code='400'/>
S: </stream:stream> S: </stream:stream>
5. Stream Authentication 5. Stream Authentication
XMPP includes two methods for enforcing authentication at the level XMPP includes two methods for enforcing authentication at the level
of XML streams. When one entity is already known to another (i.e., of XML streams. When one entity is already known to another (i.e.,
there is an existing trust relationship between the entities such as there is an existing trust relationship between the entities such as
that established when a user registers with a server or an that established when a user registers with a server or an
administrator configures a server to trust another server), the administrator configures a server to trust another server), the
preferred method for authenticating streams between the two entities preferred method for authenticating streams between the two entities
skipping to change at page 31, line 33 skipping to change at page 32, line 33
As described under extended namespaces (Section 7.6), a presence As described under extended namespaces (Section 7.6), a presence
stanza MAY also contain any properly-namespaced child element (other stanza MAY also contain any properly-namespaced child element (other
than the core data elements, stream elements, or defined children than the core data elements, stream elements, or defined children
thereof). thereof).
7.5 IQ Stanzas 7.5 IQ Stanzas
7.5.1 Overview 7.5.1 Overview
Info/Query, or IQ, is a request-response mechanism. Just as HTTP is Info/Query, or IQ, is a request-response mechanism, similar in some
a request-response medium, so IQ stanzas in the 'jabber:client' or ways to HTTP [28]. IQ stanzas in the 'jabber:client' or
'jabber:server' namespace enable an entity to make a request of, and 'jabber:server' namespace enable an entity to make a request of, and
receive a response from, another entity. The data content of the receive a response from, another entity. The data content of the
request and response is defined by the namespace declaration of a request and response is defined by the namespace declaration of a
direct child element of the IQ element, and the interaction is direct child element of the IQ element, and the interaction is
tracked by the requesting entity through use of the 'id' attribute, tracked by the requesting entity through use of the 'id' attribute,
which responding entities SHOULD return in any response. which responding entities SHOULD return in any response.
Most IQ interactions follow a common pattern of structured data Most IQ interactions follow a common pattern of structured data
exchange such as get/result or set/result (although an error may be exchange such as get/result or set/result (although an error may be
returned in response to a request if appropriate): returned in response to a request if appropriate):
skipping to change at page 39, line 47 skipping to change at page 40, line 47
[10] Hoffman, P. and M. Blanchet, "Nameprep: A Stringprep Profile [10] Hoffman, P. and M. Blanchet, "Nameprep: A Stringprep Profile
for Internationalized Domain Names (draft-ietf-idn-nameprep-11, for Internationalized Domain Names (draft-ietf-idn-nameprep-11,
work in progress)", June 2002. work in progress)", June 2002.
[11] Hoffman, P. and M. Blanchet, "Preparation of Internationalized [11] Hoffman, P. and M. Blanchet, "Preparation of Internationalized
Strings ("stringprep")", RFC 3454, December 2002. Strings ("stringprep")", RFC 3454, December 2002.
[12] Saint-Andre, P. and J. Hildebrand, "Nodeprep: A Stringprep [12] Saint-Andre, P. and J. Hildebrand, "Nodeprep: A Stringprep
Profile for Node Identifiers in XMPP (draft-ietf-xmpp-nodeprep- Profile for Node Identifiers in XMPP (draft-ietf-xmpp-nodeprep-
00, work in progress)", February 2003. 01, work in progress)", February 2003.
[13] Saint-Andre, P. and J. Hildebrand, "Resourceprep: A Stringprep [13] Saint-Andre, P. and J. Hildebrand, "Resourceprep: A Stringprep
Profile for Resource Identifiers in XMPP (draft-ietf-xmpp- Profile for Resource Identifiers in XMPP (draft-ietf-xmpp-
resourceprep-00, work in progress)", February 2003. resourceprep-01, work in progress)", February 2003.
[14] World Wide Web Consortium, "Namespaces in XML", W3C xml-names, [14] World Wide Web Consortium, "Namespaces in XML", W3C xml-names,
January 1999, <http://www.w3.org/TR/1999/REC-xml-names- January 1999, <http://www.w3.org/TR/1999/REC-xml-names-
19990114/>. 19990114/>.
[15] Myers, J., "Simple Authentication and Security Layer (SASL)", [15] Myers, J., "Simple Authentication and Security Layer (SASL)",
RFC 2222, October 1997. RFC 2222, October 1997.
[16] Dierks, T., Allen, C., Treese, W., Karlton, P., Freier, A. and [16] Dierks, T., Allen, C., Treese, W., Karlton, P., Freier, A. and
P. Kocher, "The TLS Protocol Version 1.0", RFC 2246, January P. Kocher, "The TLS Protocol Version 1.0", RFC 2246, January
skipping to change at page 41, line 5 skipping to change at page 41, line 52
[26] International Organization for Standardization, "Information [26] International Organization for Standardization, "Information
Technology - Universal Multiple-octet coded Character Set (UCS) Technology - Universal Multiple-octet coded Character Set (UCS)
- Amendment 2: UCS Transformation Format 8 (UTF-8)", ISO - Amendment 2: UCS Transformation Format 8 (UTF-8)", ISO
Standard 10646-1 Addendum 2, October 1996. Standard 10646-1 Addendum 2, October 1996.
[27] Saint-Andre, P. and J. Hildebrand, "End-to-End Object [27] Saint-Andre, P. and J. Hildebrand, "End-to-End Object
Encryption in XMPP (draft-ietf-xmpp-e2e-00, work in progress)", Encryption in XMPP (draft-ietf-xmpp-e2e-00, work in progress)",
February 2003. February 2003.
[28] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., Masinter, L.,
Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol --
HTTP/1.1", RFC 2616, June 1999.
Authors' Addresses Authors' Addresses
Peter Saint-Andre Peter Saint-Andre
Jabber Software Foundation Jabber Software Foundation
EMail: stpeter@jabber.org EMail: stpeter@jabber.org
URI: http://www.jabber.org/people/stpeter.php URI: http://www.jabber.org/people/stpeter.php
Jeremie Miller Jeremie Miller
Jabber Software Foundation Jabber Software Foundation
EMail: jeremie@jabber.org EMail: jeremie@jabber.org
URI: http://www.jabber.org/people/jer.php URI: http://www.jabber.org/people/jer.php
Appendix A. Standard Error Codes Appendix A. Standard Error Codes
A standard error element is used for failed processing of XML A standard error element is used for failed processing of XML
stanzas. This element is a child of the failed stanza and MUST stanzas. This element is a child of the failed stanza and MUST
include a 'code' attribute corresponding to one of the following include a 'code' attribute corresponding to appropriate error
error codes. condition.
o 302 (Redirect) - Whereas HTTP contains eight different codes for In general the standard error codes were "borrowed" from those used
redirection, XMPP contains only one (which is intended to stand in HTTP [28] early in the development of XMPP within the Jabber
for any redirection error). However, code 302 is being reserved community. The first digit of the error code defines the class of
for future functionality and is not implemented at this time. response. The last two digits do not have any categorization role.
There are five possible values for the first digit:
o 1xx: Informational - Request received, continuing process [not
currently used within XMPP]
o 2xx: Success - The action was successfully received, understood,
and accepted [not currently used within XMPP]
o 3xx: Redirection - Further action must be taken in order to
complete the request
o 4xx: Client Error - The request contains bad syntax or cannot be
fulfilled
o 5xx: Server Error - The server failed to fulfill an apparently
valid request
The individual values of the numeric status/error codes defined for
XMPP, and an example set of corresponding textual descriptions, are
presented below. The textual descriptions listed here are only
recommendations -- they MAY be replaced by local equivalents without
affecting the protocol.
o 302 (Redirect) - Code 302 is used when a server needs to redirect
stream initiation requests to another hostname or IP address.
o 400 (Bad Request) - Code 400 is used to inform a sender that a o 400 (Bad Request) - Code 400 is used to inform a sender that a
request could not be understood by the recipient. This might be request could not be understood by the recipient. This might be
generated when, for example, an entity sends a message that does generated when an entity sends non-well-formed XML or when a
not have a 'to' attribute. message stanza does not have a 'to' attribute.
o 401 (Unauthorized) - Code 401 is used to inform clients that they o 401 (Unauthorized) - Code 401 is used to inform clients that they
have provided incorrect authorization information, e.g., an have provided incorrect authorization information, e.g., an
incorrect password or unknown username when attempting to incorrect password or unknown username when attempting to
authenticate with a service. authenticate with a service.
o 402 (Payment Required) - Code 402 is being reserved for future o 402 (Payment Required) - Code 402 is being reserved for future
use. use.
o 403 (Forbidden) - Code 403 is used to inform an entity that its o 403 (Forbidden) - Code 403 is used to inform an entity that its
skipping to change at page 43, line 12 skipping to change at page 44, line 37
o 407 (Registration Required) - Code 407 is used when a message or o 407 (Registration Required) - Code 407 is used when a message or
request is sent to a service that requires prior registration, request is sent to a service that requires prior registration,
e.g., if a user attempts to send a message through a gateway to a e.g., if a user attempts to send a message through a gateway to a
foreign messaging system without having first registered with that foreign messaging system without having first registered with that
gateway. gateway.
o 408 (Request Timeout) - Code 408 is returned when a recipient does o 408 (Request Timeout) - Code 408 is returned when a recipient does
not produce a response within the time that the sender was not produce a response within the time that the sender was
prepared to wait. prepared to wait.
o 409 (Conflict) - Code 409 is returned when a recipient does not
produce a response within the time that the sender was prepared to
wait.
o 410 (Gone) - Code 410 is returned by a server when the hostname
requested by an entity initiating a stream request is no longer
provided by a server.
o 500 (Internal Server Error) - Code 500 is used when a server or o 500 (Internal Server Error) - Code 500 is used when a server or
service encounters an unexpected condition which prevents it from service encounters an unexpected condition which prevents it from
handling an XML stanza from a sender, e.g., if an authentication handling a stream initiation request or an XML stanza from a
request is not handled by a server because the password could not sender.
be retrieved.
o 501 (Not Implemented) - Code 501 is used when the recipient does o 501 (Not Implemented) - Code 501 is used when the recipient does
not support the functionality being requested by a sender, e.g., not support the functionality being requested by a sender, e.g.,
if a user attempts to register with a server that does not allow if a user attempts to register with a server that does not allow
registration. registration.
o 502 (Remote Server Error) - Code 502 is used when delivery of an o 502 (Remote Server Error) - Code 502 is used when delivery of an
XML stanza fails because of an inability to reach the intended XML stanza fails because of an inability to reach the intended
remote server or service, e.g., because a remote server's hostname remote server or service, e.g., because a remote server's hostname
could not be resolved. could not be resolved.
o 503 (Service Unavailable) - Code 503 is used when a sender o 503 (Service Unavailable) - Code 503 is used when a sender
requests a service that a recipient is temporarily unable to requests a service that a recipient is temporarily unable to
offer. offer.
o 504 (Remote Server Timeout) - Code 504 is used when attempts to o 504 (Remote Server Timeout) - Code 504 is used when attempts to
contact a remote server timeout, e.g., if an incorrect hostname is contact a remote server timeout, e.g., if an incorrect hostname is
specified. specified.
Appendix B. Formal Definitions o 505 (Version Not Supported) - Code 505 is used when a server does
not support the XMPP version requested by an entity that initiates
a stream to the server.
B.1 streams namespace Appendix B. XML Schemas
The namespace declaration for the root stream element is 'http:// The following XML schemas are descriptive, not normative.
etherx.jabber.org/streams'.
B.1.1 DTD B.1 streams namespace
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT stream (#PCDATA | error?)*>
<!ATTLIST stream
to CDATA #IMPLIED
from CDATA #IMPLIED
id ID #IMPLIED
version CDATA #IMPLIED
>
<!ELEMENT error (#PCDATA)>
<!ELEMENT features (#PCDATA)>
B.1.2 Schema
<?xml version='1.0' encoding='UTF-8'?> <xs:schema
<xsd:schema
xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://etherx.jabber.org/streams' targetNamespace='http://etherx.jabber.org/streams'
xmlns='http://etherx.jabber.org/streams' xmlns='http://etherx.jabber.org/streams'
elementFormDefault='qualified'> elementFormDefault='qualified'>
<xsd:element name='stream'> <xs:element name='stream'>
<xsd:complexType mixed='true'> <xs:complexType>
<xsd:element ref='error' minOccurs='0' maxOccurs='1'/> <xs:element ref='features' minOccurs='0' maxOccurs='unbounded'/>
<xsd:choice> <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
<xsd:any <xs:choice>
<xs:any
namespace='jabber:client' namespace='jabber:client'
maxOccurs='1'/> maxOccurs='1'/>
<xsd:any <xs:any
namespace='jabber:server' namespace='jabber:server'
maxOccurs='1'/> maxOccurs='1'/>
</xsd:choice> </xs:choice>
<xsd:attribute name='to' type='xsd:string' use='optional'/> <xs:attribute name='to' type='xs:string' use='optional'/>
<xsd:attribute name='from' type='xsd:string' use='optional'/> <xs:attribute name='from' type='xs:string' use='optional'/>
<xsd:attribute name='id' type='xsd:ID' use='optional'/> <xs:attribute name='id' type='xs:ID' use='optional'/>
<xsd:attribute name='version' type='xsd:decimal' use='optional'/> <xs:attribute name='version' type='xs:decimal' use='optional'/>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='error' type='xsd:string'/> <xs:element name='error'/>
<xs:complexType>
<xs:attribute name='code' type='xs:string' use='required'>
<xs:simpleType>
<xs:restriction base='xs:nonNegativeInteger'>
<xs:enumeration value='302'/>
<xs:enumeration value='400'/>
<xs:enumeration value='404'/>
<xs:enumeration value='410'/>
<xs:enumeration value='500'/>
<xs:enumeration value='505'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xsd:schema> </xs:schema>
B.2 SASL namespace B.2 SASL namespace
The namespace declaration for SASL-related elements is 'http://
www.iana.org/assignments/sasl-mechanisms'.
B.2.1 DTD
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT mechanisms (mechanism)*>
<!ELEMENT mechanism (#PCDATA)>
<!ELEMENT auth (#PCDATA)>
<!ATTLIST auth mechanism CDATA #REQUIRED>
<!ELEMENT challenge (#PCDATA)>
<!ELEMENT response (#PCDATA)>
<!ELEMENT abort (#PCDATA)>
<!ELEMENT success (#PCDATA)>
<!ELEMENT failure (#PCDATA)>
B.2.2 Schema
<?xml version='1.0' encoding='UTF-8'?> <xs:schema
<xsd:schema
xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://www.iana.org/assignments/sasl-mechanisms' targetNamespace='http://www.iana.org/assignments/sasl-mechanisms'
xmlns='http://www.iana.org/assignments/sasl-mechanisms' xmlns='http://www.iana.org/assignments/sasl-mechanisms'
elementFormDefault='qualified'> elementFormDefault='qualified'>
<xsd:element name='mechanisms'> <xs:element name='mechanisms'>
<xsd:complexType> <xs:complexType>
<xsd:sequence minOccurs='0' maxOccurs='unbounded'> <xs:sequence minOccurs='0' maxOccurs='unbounded'>
<xsd:element ref='mechanism'/> <xs:element ref='mechanism'/>
</xsd:sequence> </xs:sequence>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='mechanism'/>
<xsd:element name='auth'> <xs:element name='mechanism'/>
<xsd:complexType mixed='true'>
<xsd:attribute name='mechanism' type='xsd:string' use='optional'/>
</xsd:complexType>
</xsd:element>
<xsd:element name='challenge' type='xsd:string'/> <xs:element name='auth'>
<xsd:element name='response' type='xsd:string'/> <xs:complexType>
<xsd:element name='abort' type='xsd:string'/> <xs:attribute name='mechanism' type='xs:string' use='optional'/>
<xsd:element name='success' type='xsd:string'/> </xs:complexType>
<xsd:element name='failure' type='xsd:string'/> </xs:element>
</xsd:schema> <xs:element name='challenge' type='xs:string'/>
<xs:element name='response' type='xs:string'/>
<xs:element name='abort' type='xs:string'/>
<xs:element name='success' type='xs:string'/>
<xs:element name='failure' type='xs:string'/>
B.3 jabber:client namespace </xs:schema>
B.3.1 DTD B.3 Dialback namespace
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT message (( body* | subject* | thread? |
error? | (#PCDATA) )*)>
<!ATTLIST message
to CDATA #IMPLIED
from CDATA #IMPLIED
id ID #IMPLIED
xml:lang NMTOKEN #IMPLIED
type ( chat | groupchat | headline | error ) #IMPLIED
>
<!ELEMENT body (#PCDATA)>
<!ATTLIST body xml:lang NMTOKEN #IMPLIED>
<!ELEMENT subject (#PCDATA)>
<!ATTLIST subject xml:lang NMTOKEN #IMPLIED>
<!ELEMENT thread (#PCDATA)>
<!ELEMENT presence (( show? | status* | priority? | error? )*)> <xs:schema
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
<!ATTLIST presence targetNamespace='jabber:server:dialback'
to CDATA #IMPLIED xmlns='jabber:server:dialback'
from CDATA #IMPLIED elementFormDefault='qualified'>
id ID #IMPLIED
xml:lang NMTOKEN #IMPLIED
type ( subscribe | subscribed | unsubscribe |
unsubscribed | unavailable | error ) #IMPLIED
>
<!ELEMENT show (#PCDATA)>
<!ELEMENT status (#PCDATA)>
<!ATTLIST status xml:lang NMTOKEN #IMPLIED>
<!ELEMENT priority (#PCDATA)>
<!ELEMENT iq ( error | (#PCDATA) )*> <xs:element name='result'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute name='from' type='xs:string' use='required'/>
<xs:attribute name='to' type='xs:string' use='required'/>
<xs:attribute name='type' type='xs:string' use='optional'>
<xs:simpleType>
<xs:restriction base='xs:NCName'>
<xs:enumeration value='invalid'/>
<xs:enumeration value='valid'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<!ATTLIST iq <xs:element name='verify'>
to CDATA #IMPLIED <xs:complexType>
from CDATA #IMPLIED <xs:simpleContent>
id ID #IMPLIED <xs:extension base='xs:string'>
type ( get | set | result | error ) #REQUIRED <xs:attribute name='from' type='xs:string' use='required'/>
> <xs:attribute name='to' type='xs:string' use='required'/>
<xs:attribute name='id' type='xs:string' use='required'/>
<xs:attribute name='type' type='xs:string' use='optional'>
<xs:simpleType>
<xs:restriction base='xs:NCName'>
<xs:enumeration value='invalid'/>
<xs:enumeration value='valid'/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<!ELEMENT error (#PCDATA)> </xs:schema>
<!ATTLIST error
code CDATA #REQUIRED
xml:lang NMTOKEN #IMPLIED
>
B.3.2 Schema B.4 jabber:client namespace
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<xsd:schema <xs:schema
xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://www.jabber.org/protocol' targetNamespace='jabber:client'
xmlns='http://www.jabber.org/protocol' xmlns='jabber:client'
elementFormDefault='qualified'> elementFormDefault='qualified'>
<xsd:element name='message'>
<xsd:complexType mixed='true'> <xs:element name='message'>
<xsd:choice maxOccurs='unbounded'> <xs:complexType>
<xsd:element ref='body' minOccurs='0' maxOccurs='unbounded'/> <xs:choice maxOccurs='unbounded'>
<xsd:element ref='subject' minOccurs='0' maxOccurs='unbounded'/> <xs:element ref='body' minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref='thread' minOccurs='0' maxOccurs='1'/> <xs:element ref='subject' minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref='error' minOccurs='0' maxOccurs='1'/> <xs:element ref='thread' minOccurs='0' maxOccurs='1'/>
<xsd:any <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
<xs:any
namespace='##other' namespace='##other'
minOccurs='0' minOccurs='0'
maxOccurs='unbounded'/> maxOccurs='unbounded'/>
</xsd:choice> </xs:choice>
<xsd:attribute name='to' type='xsd:string' use='optional'/> <xs:attribute name='to' type='xs:string' use='optional'/>
<xsd:attribute name='from' type='xsd:string' use='optional'/> <xs:attribute name='from' type='xs:string' use='optional'/>
<xsd:attribute name='id' type='xsd:ID' use='optional'/> <xs:attribute name='id' type='xs:ID' use='optional'/>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
<xsd:attribute name='type' use='optional'> <xs:attribute name='type' use='optional'>
<xsd:simpleType> <xs:simpleType>
<xsd:restriction base='xsd:NCName'> <xs:restriction base='xs:NCName'>
<xsd:enumeration value='chat'/> <xs:enumeration value='chat'/>
<xsd:enumeration value='groupchat'/> <xs:enumeration value='groupchat'/>
<xsd:enumeration value='headline'/> <xs:enumeration value='headline'/>
<xsd:enumeration value='error'/> <xs:enumeration value='error'/>
</xsd:restriction> </xs:restriction>
</xsd:simpleType> </xs:simpleType>
</xsd:attribute> </xs:attribute>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='body' type='xsd:string'>
<xsd:complexType>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/>
</xsd:complexType>
</xsd:element>
<xsd:element name='subject' type='xsd:string'> <xs:element name='body' type='xs:string'>
<xsd:complexType> <xs:complexType>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='thread' type='xsd:string'/> <xs:element name='subject' type='xs:string'>
<xs:complexType>
<xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xs:complexType>
</xs:element>
<xsd:element name='presence'> <xs:element name='thread' type='xs:string'/>
<xsd:complexType> <xs:element name='presence'>
<xsd:choice maxOccurs='unbounded'> <xs:complexType>
<xsd:element ref='show' minOccurs='0' maxOccurs='1'/> <xs:choice maxOccurs='unbounded'>
<xsd:element ref='status' minOccurs='0' maxOccurs='unbounded'/> <xs:element ref='show' minOccurs='0' maxOccurs='1'/>
<xsd:element ref='priority' minOccurs='0' maxOccurs='1'/> <xs:element ref='status' minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref='error' minOccurs='0' maxOccurs='1'/> <xs:element ref='priority' minOccurs='0' maxOccurs='1'/>
<xsd:any <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
<xs:any
namespace='##other' namespace='##other'
minOccurs='0' minOccurs='0'
maxOccurs='unbounded'/> maxOccurs='unbounded'/>
</xsd:choice> </xs:choice>
<xsd:attribute name='to' type='xsd:string' use='optional'/> <xs:attribute name='to' type='xs:string' use='optional'/>
<xsd:attribute name='from' type='xsd:string' use='optional'/> <xs:attribute name='from' type='xs:string' use='optional'/>
<xsd:attribute name='id' type='xsd:ID' use='optional'/> <xs:attribute name='id' type='xs:ID' use='optional'/>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
<xsd:attribute name='type' use='optional'> <xs:attribute name='type' use='optional'>
<xsd:simpleType> <xs:simpleType>
<xsd:restriction base='xsd:NCName'> <xs:restriction base='xs:NCName'>
<xsd:enumeration value='subscribe'/> <xs:enumeration value='subscribe'/>
<xsd:enumeration value='subscribed'/> <xs:enumeration value='subscribed'/>
<xsd:enumeration value='unsubscribe'/> <xs:enumeration value='unsubscribe'/>
<xsd:enumeration value='unsubscribed'/> <xs:enumeration value='unsubscribed'/>
<xsd:enumeration value='unavailable'/> <xs:enumeration value='unavailable'/>
<xsd:enumeration value='error'/> <xs:enumeration value='error'/>
</xsd:restriction> </xs:restriction>
</xsd:simpleType> </xs:simpleType>
</xsd:attribute> </xs:attribute>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='show'>
<xsd:simpleType>
<xsd:restriction base='xsd:NCName'>
<xsd:enumeration value='away'/>
<xsd:enumeration value='chat'/>
<xsd:enumeration value='xa'/>
<xsd:enumeration value='dnd'/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name='status' type='xsd:string'> <xs:element name='show'>
<xsd:complexType> <xs:simpleType>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:restriction base='xs:NCName'>
</xsd:complexType> <xs:enumeration value='away'/>
</xsd:element> <xs:enumeration value='chat'/>
<xs:enumeration value='xa'/>
<xs:enumeration value='dnd'/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xsd:element name='priority' type='xsd:byte'/> <xs:element name='status' type='xs:string'>
<xs:complexType>
<xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xs:complexType>
</xs:element>
<xs:element name='priority' type='xs:byte'/>
<xsd:element name='iq'> <xs:element name='iq'>
<xsd:complexType mixed='true'> <xs:complexType>
<xsd:choice maxOccurs='unbounded'> <xs:choice maxOccurs='unbounded'>
<xsd:element ref='error' minOccurs='0' maxOccurs='1'/> <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
<xsd:any <xs:any
namespace='##other' namespace='##other'
minOccurs='0' minOccurs='0'
maxOccurs='unbounded'/> maxOccurs='unbounded'/>
</xsd:choice> </xs:choice>
<xsd:attribute name='to' type='xsd:string' use='optional'/> <xs:attribute name='to' type='xs:string' use='optional'/>
<xsd:attribute name='from' type='xsd:string' use='optional'/> <xs:attribute name='from' type='xs:string' use='optional'/>
<xsd:attribute name='id' type='xsd:ID' use='optional'/> <xs:attribute name='id' type='xs:ID' use='optional'/>
<xsd:attribute name='type' use='required'> <xs:attribute name='type' use='required'>
<xsd:simpleType> <xs:simpleType>
<xsd:restriction base='xsd:NCName'> <xs:restriction base='xs:NCName'>
<xsd:enumeration value='get'/> <xs:enumeration value='get'/>
<xsd:enumeration value='set'/> <xs:enumeration value='set'/>
<xsd:enumeration value='result'/> <xs:enumeration value='result'/>
<xsd:enumeration value='error'/> <xs:enumeration value='error'/>
</xsd:restriction> </xs:restriction>
</xsd:simpleType> </xs:simpleType>
</xsd:attribute> </xs:attribute>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='error'> <xs:element name='error'>
<xsd:complexType> <xs:complexType>
<xsd:attribute <xs:attribute
name='code' name='code'
type='xsd:nonNegativeInteger' type='xs:nonNegativeInteger'
use='required'/> use='required'/>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
</xsd:schema>
B.4 jabber:server namespace </xs:schema>
B.4.1 DTD B.5 jabber:server namespace
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT message (( body* | subject* | thread? |
error? | (#PCDATA) )*)>
<!ATTLIST message
to CDATA #REQUIRED
from CDATA #REQUIRED
id ID #IMPLIED
xml:lang NMTOKEN #IMPLIED
type ( chat | groupchat | headline | error ) #IMPLIED
>
<!ELEMENT body (#PCDATA)>
<!ATTLIST body xml:lang NMTOKEN #IMPLIED>
<!ELEMENT subject (#PCDATA)>
<!ATTLIST subject xml:lang NMTOKEN #IMPLIED>
<!ELEMENT thread (#PCDATA)>
<!ELEMENT presence (( show? | status* | priority? | error? )*)>
<!ATTLIST presence
to CDATA #REQUIRED
from CDATA #REQUIRED
id ID #IMPLIED
xml:lang NMTOKEN #IMPLIED
type ( subscribe | subscribed | unsubscribe |
unsubscribed | unavailable | error ) #IMPLIED
>
<!ELEMENT show (#PCDATA)> <xs:schema
<!ELEMENT status (#PCDATA)>
<!ATTLIST status xml:lang NMTOKEN #IMPLIED>
<!ELEMENT priority (#PCDATA)>
<!ELEMENT iq ( error | (#PCDATA) )*>
<!ATTLIST iq
to CDATA #REQUIRED
from CDATA #REQUIRED
id ID #IMPLIED
type ( get | set | result | error ) #REQUIRED
>
<!ELEMENT error (#PCDATA)>
<!ATTLIST error
code CDATA #REQUIRED
xml:lang NMTOKEN #IMPLIED
>
B.4.2 Schema
<?xml version='1.0' encoding='UTF-8'?>
<xsd:schema
xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://www.jabber.org/protocol' targetNamespace='http://www.jabber.org/protocol'
xmlns='http://www.jabber.org/protocol' xmlns='http://www.jabber.org/protocol'
elementFormDefault='qualified'> elementFormDefault='qualified'>
<xsd:element name='message'> <xs:element name='message'>
<xsd:complexType mixed='true'> <xs:complexType>
<xsd:choice maxOccurs='unbounded'> <xs:choice maxOccurs='unbounded'>
<xsd:element ref='body' minOccurs='0' maxOccurs='unbounded'/> <xs:element ref='body' minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref='subject' minOccurs='0' maxOccurs='unbounded'/> <xs:element ref='subject' minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref='thread' minOccurs='0' maxOccurs='1'/> <xs:element ref='thread' minOccurs='0' maxOccurs='1'/>
<xsd:element ref='error' minOccurs='0' maxOccurs='1'/> <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
<xsd:any <xs:any
namespace='##other' namespace='##other'
minOccurs='0' minOccurs='0'
maxOccurs='unbounded'/> maxOccurs='unbounded'/>
</xsd:choice> </xs:choice>
<xsd:attribute name='to' type='xsd:string' use='required'/> <xs:attribute name='to' type='xs:string' use='required'/>
<xsd:attribute name='from' type='xsd:string' use='required'/> <xs:attribute name='from' type='xs:string' use='required'/>
<xsd:attribute name='id' type='xsd:ID' use='optional'/> <xs:attribute name='id' type='xs:ID' use='optional'/>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
<xsd:attribute name='type' use='optional'> <xs:attribute name='type' use='optional'>
<xsd:simpleType> <xs:simpleType>
<xsd:restriction base='xsd:NCName'> <xs:restriction base='xs:NCName'>
<xsd:enumeration value='chat'/> <xs:enumeration value='chat'/>
<xsd:enumeration value='groupchat'/> <xs:enumeration value='groupchat'/>
<xsd:enumeration value='headline'/> <xs:enumeration value='headline'/>
<xsd:enumeration value='error'/> <xs:enumeration value='error'/>
</xsd:restriction> </xs:restriction>
</xsd:simpleType> </xs:simpleType>
</xsd:attribute> </xs:attribute>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='body' type='xsd:string'> <xs:element name='body' type='xs:string'>
<xsd:complexType> <xs:complexType>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='subject' type='xsd:string'> <xs:element name='subject' type='xs:string'>
<xsd:complexType> <xs:complexType>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='thread' type='xsd:string'/> <xs:element name='thread' type='xs:string'/>
<xsd:element name='presence'> <xs:element name='presence'>
<xsd:complexType> <xs:complexType>
<xsd:choice maxOccurs='unbounded'> <xs:choice maxOccurs='unbounded'>
<xsd:element ref='show' minOccurs='0' maxOccurs='1'/> <xs:element ref='show' minOccurs='0' maxOccurs='1'/>
<xsd:element ref='status' minOccurs='0' maxOccurs='unbounded'/> <xs:element ref='status' minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref='priority' minOccurs='0' maxOccurs='1'/> <xs:element ref='priority' minOccurs='0' maxOccurs='1'/>
<xsd:element ref='error' minOccurs='0' maxOccurs='1'/> <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
<xsd:any <xs:any
namespace='##other' namespace='##other'
minOccurs='0' minOccurs='0'
maxOccurs='unbounded'/> maxOccurs='unbounded'/>
</xsd:choice> </xs:choice>
<xsd:attribute name='to' type='xsd:string' use='required'/> <xs:attribute name='to' type='xs:string' use='required'/>
<xsd:attribute name='from' type='xsd:string' use='required'/> <xs:attribute name='from' type='xs:string' use='required'/>
<xsd:attribute name='id' type='xsd:ID' use='optional'/> <xs:attribute name='id' type='xs:ID' use='optional'/>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
<xsd:attribute name='type' use='optional'> <xs:attribute name='type' use='optional'>
<xsd:simpleType> <xs:simpleType>
<xsd:restriction base='xsd:NCName'> <xs:restriction base='xs:NCName'>
<xsd:enumeration value='subscribe'/> <xs:enumeration value='subscribe'/>
<xsd:enumeration value='subscribed'/> <xs:enumeration value='subscribed'/>
<xsd:enumeration value='unsubscribe'/> <xs:enumeration value='unsubscribe'/>
<xsd:enumeration value='unsubscribed'/> <xs:enumeration value='unsubscribed'/>
<xsd:enumeration value='unavailable'/> <xs:enumeration value='unavailable'/>
<xsd:enumeration value='error'/> <xs:enumeration value='error'/>
</xsd:restriction> </xs:restriction>
</xsd:simpleType> </xs:simpleType>
</xsd:attribute> </xs:attribute>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='show'> <xs:element name='show'>
<xsd:simpleType> <xs:simpleType>
<xsd:restriction base='xsd:NCName'> <xs:restriction base='xs:NCName'>
<xsd:enumeration value='away'/> <xs:enumeration value='away'/>
<xsd:enumeration value='chat'/> <xs:enumeration value='chat'/>
<xsd:enumeration value='xa'/> <xs:enumeration value='xa'/>
<xsd:enumeration value='dnd'/> <xs:enumeration value='dnd'/>
</xsd:restriction> </xs:restriction>
</xsd:simpleType> </xs:simpleType>
</xsd:element> </xs:element>
<xsd:element name='status' type='xsd:string'> <xs:element name='status' type='xs:string'>
<xsd:complexType> <xs:complexType>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='priority' type='xsd:byte'/> <xs:element name='priority' type='xs:byte'/>
<xsd:element name='iq'> <xs:element name='iq'>
<xsd:complexType mixed='true'> <xs:complexType>
<xsd:choice maxOccurs='unbounded'> <xs:choice maxOccurs='unbounded'>
<xsd:element ref='error' minOccurs='0' maxOccurs='1'/> <xs:element ref='error' minOccurs='0' maxOccurs='1'/>
<xsd:any <xs:any
namespace='##other' namespace='##other'
minOccurs='0' minOccurs='0'
maxOccurs='unbounded'/> maxOccurs='unbounded'/>
</xsd:choice> </xs:choice>
<xsd:attribute name='to' type='xsd:string' use='required'/> <xs:attribute name='to' type='xs:string' use='required'/>
<xsd:attribute name='from' type='xsd:string' use='required'/> <xs:attribute name='from' type='xs:string' use='required'/>
<xsd:attribute name='id' type='xsd:ID' use='optional'/> <xs:attribute name='id' type='xs:ID' use='optional'/>
<xsd:attribute name='type' use='required'> <xs:attribute name='type' use='required'>
<xsd:simpleType> <xs:simpleType>
<xsd:restriction base='xsd:NCName'> <xs:restriction base='xs:NCName'>
<xsd:enumeration value='get'/> <xs:enumeration value='get'/>
<xsd:enumeration value='set'/> <xs:enumeration value='set'/>
<xsd:enumeration value='result'/> <xs:enumeration value='result'/>
<xsd:enumeration value='error'/> <xs:enumeration value='error'/>
</xsd:restriction> </xs:restriction>
</xsd:simpleType> </xs:simpleType>
</xsd:attribute> </xs:attribute>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
<xsd:element name='error'> <xs:element name='error'>
<xsd:complexType> <xs:complexType>
<xsd:attribute <xs:attribute
name='code' name='code'
type='xsd:nonNegativeInteger' type='xs:nonNegativeInteger'
use='required'/> use='required'/>
<xsd:attribute name='xml:lang' type='xsd:NMTOKEN' use='optional'/> <xs:attribute name='xml:lang' type='xs:NMTOKEN' use='optional'/>
</xsd:complexType> </xs:complexType>
</xsd:element> </xs:element>
</xsd:schema> </xs:schema>
Appendix C. Revision History Appendix C. Revision History
Note to RFC editor: please remove this entire appendix, and the Note to RFC editor: please remove this entire appendix, and the
corresponding entries in the table of contents, prior to publication. corresponding entries in the table of contents, prior to publication.
C.1 Changes from draft-ietf-xmpp-core-01 C.1 Changes from draft-ietf-xmpp-core-02
o Added dialback schema.
o Removed all DTDs since schemas are provide more complete
definitions.
o Added stream error codes.
o Clarified error code "philosophy".
C.2 Changes from draft-ietf-xmpp-core-01
o Updated the addressing restrictions per list discussion and added o Updated the addressing restrictions per list discussion and added
references to the new nodeprep and resourceprep profiles. references to the new nodeprep and resourceprep profiles.
o Corrected error in Stream Authentication regarding version='1.0' o Corrected error in Stream Authentication regarding version='1.0'
flag. flag.
o Made numerous small editorial changes. o Made numerous small editorial changes.
C.2 Changes from draft-ietf-xmpp-core-00 C.3 Changes from draft-ietf-xmpp-core-00
o Added information about TLS from list discussion. o Added information about TLS from list discussion.
o Clarified meaning of "ignore" based on list discussion. o Clarified meaning of "ignore" based on list discussion.
o Clarified information about Universal Character Set data and o Clarified information about Universal Character Set data and
character encodings. character encodings.
o Provided base64-decoded information for examples. o Provided base64-decoded information for examples.
o Fixed several errors in the schemas. o Fixed several errors in the schemas.
o Made numerous small editorial fixes. o Made numerous small editorial fixes.
C.3 Changes from draft-miller-xmpp-core-02 C.4 Changes from draft-miller-xmpp-core-02
o Brought Streams Authentication section into line with discussion o Brought Streams Authentication section into line with discussion
on list and at IETF 55 meeting. on list and at IETF 55 meeting.
o Added information about the optional 'xml:lang' attribute per o Added information about the optional 'xml:lang' attribute per
discussion on list and at IETF 55 meeting. discussion on list and at IETF 55 meeting.
o Specified that validation is neither required nor recommended, and o Specified that validation is neither required nor recommended, and
that the formal definitions (DTDs and schemas) are included for that the formal definitions (DTDs and schemas) are included for
descriptive purposes only. descriptive purposes only.
 End of changes. 83 change blocks. 
509 lines changed or deleted 527 lines changed or added

This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/