On Wednesday 08 August 2007 1:44 pm, Peter Saint-Andre wrote:
> XMPP Extensions Editor wrote:
> > Version 0.1 of XEP-0225 (Component Connections) has been released.
> >
> > Abstract: This document specifies a standards-track XMPP protocol
> > extension that enables server components to connect to XMPP servers.
>
> One of the items up for discussion is the default namespace for
> component connections. At the XMPP DevCon we thought that it would be
> good to use 'jabber:client', but I know that both Matthias Wimmer and
> Ralph Meijer have some arguments for 'jabber:server'. So perhaps we
> could have a debate about that. :)
For namespace-aware implementations, these multiple namespaces are a real
pain. <body xmlns='jabber:client'> and <body xmlns='jabber:server'> have
identical meaning: a body of a message. Yet, namespace-aware implementations
will consider these to be two distinct elements. This affects the creating
and parsing of all RFC 3920 and 3921 XML data. You need to write code that
understands both namespaces and can output under either namespace (depending
on whether a stanza is going out on c2s or s2s).
In jabberd2, I believe all XML is internally handled in the jabber:client
namespace. I did the same thing in Ambrosia. When a stanza arrives over
s2s, I iterate over the DOM and change all namespace instances
of 'jabber:server' to 'jabber:client' (note here that I'm not talking about
xmlns attributes, but rather the namespace property of each DOM element).
This allows me to reuse all of my existing stanza parsing and generation code
based on a single namespace ('jabber:client').
Additionally, I think indicating support for a feature or connection type
simply through a namespace declaration is weird. A namespace declaration
indicates what namespace child elements should be assigned to, when you
actually have child elements. By itself it doesn't have much meaning.
Namespace declarations don't show up in DOM either (they do show up in SAX
though, which is how I handle them). I personally think it was a mistake to
use namespace declarations to indicate c2s vs s2s, or to indicate dialback
support, and so I vote not repeating this mistake. This means
no 'jabber:component' or such. The choice should be between 'jabber:client'
and 'jabber:server' for the namespace. Use a real attribute or element to
indicate component support.
-Justin