Right, this allows us to detirmine whether it's a client, server, or component. We actually do this - so if you want to, you can point clients, components, and servers alike at a single port and it'll all just work.So you MUST absolutely have a
default namespace in the root <stream>, and this one MUST be the one
for the stanza ("jabber:client" or "jabber:server", most typically)
If we didn't do this, we'd need some additional signalling to distinguish, or else we'd have to use distinct TCP ports for all three, which seems suboptimal, especially when we're already using this quite happily.
Well if you've already got a default namespace, it stands to reason you can't have the stream top-level elements in it.
+
you MUST have a prefix declared, for the stream related first level
elements,
I don't care about this, and FWIW, we do not rely on it. Also, it's a SHOULD not a MUST, and a MAY rely on. The latter, I think, needs changing - this should be SHOULD (because of legacy systems) and MUST NOT rely on.
and this prefix MUST be "stream".
No, the RFC says you MAY reject it. Section 11.2.1 says so.
So for instance, the current RFC asks me to reject and consider this
stream start as an error, though it is perfectly valid XML and
conforming to XMPP:
<toto:stream
from='juliet at im.example.com'
to='im.example.com'
version='1.0'
xml:lang='en'
xmlns='jabber:client'
xmlns:toto='http://etherx.jabber.org/streams'>
See above. Various other things, like XEP-0220, get triggered by the default namespace choice of the initiator of the stream.
And many other examples: for instance, if I prefer to use a declared
namespace for "jabber:client" instead of a default namespace, why
couldn't I?
"it may therefore be a good idea, though not mandatory" = SHOULD.
For historical reasons, some older implementations may accept only a
stream element qualification through a prefix named "stream" (and not
for instance through a default namespace, nor a prefix named other
than "stream"), declared in the initial <stream/> element. For
backwards compatibility, it may therefore be a good idea, though not
mandatory, to declare a prefix named "stream" and with value
"http://etherx.jabber.org/streams" in the <stream/> header. However an
implementation MUST NOT send any error, hence reject a stream doing
differently, as long as the qualified names for the <stream/>,
<features/> and <error/> element are correct with this alternative
method.
Note Well: Messages sent to this mailing list are the opinions of the senders and do not imply endorsement by the IETF.