[Standards-JIG] Why is S2S on 5269 and not 5222?

Ralph Meijer jabber.org at ralphm.ik.nu
Sun Dec 3 11:41:09 UTC 2006


On Sat, Dec 02, 2006 at 01:09:55AM +0100, Matthias Wimmer wrote:
> Note: I read RFC 3920, 11.2.2 in a way, that it is not required to have
> the xmlns='jabber:client' or xmlns='jabber:server' attribute on the
> stream root element. - And from the XML point of view such a requirement
> would be strange, as the following XML code is equivalent:
> [..]

Absolutely not.

That section explicitely states:

  A default namespace declaration is REQUIRED [..]

and

  An implementation MUST NOT generate namespace prefixes for elements in
  the default namespace.

The first means you MUST have xmlns='jabber:client' or
xmlns='jabber:server' in the stream header. The second then implies that
you cannot use prefixes for elements in the jabber:client namespace if
that is the default namespace for the stream. Same for jabber:server.

This is a backward compatibility thing with pre-XMPP implementations.
The fact that in pure XML you can have different representations is not
relevant. XML Streams have a number of restrictions placed on them with
respect to pure XML.

-- 
Groetjes,

ralphm



More information about the Standards mailing list