[Standards-JIG] Allowed tricks with namespaces
Matthias Wimmer
m at tthias.eu
Sun May 21 10:39:36 CDT 2006
Hi Michal!
Michal vorner Vaner wrote:
> But, is it allowed to move the namespace to some higher levels and use
> prefixes (if I understand them right):
>
> <message sm:xmlns='something'><sm:something/></message>
>
> And, does this have any limitations?
>
Yes, this is allowed (if you include a to attribute to your stanza). But
you _might_ get into problems with some older (non-RFC3920-conformant)
servers. But at least with current version of jabberd14, jabberd2,
ejabberd (and others) you should not have problems with it.
> And, if it is possible, what is server supposed to do, when some clients
> defines such a prefix in the stream element and the message should be
> routed to other client, which does not have such prefix defined? It
> should probably rewrite somehow to message, otherwise the other client
> would not have the namespace. Should it move the prefix definition into
> the stanza or strip the prefixes and include the namespace inline?
>
Probably the server will just send the message with the same prefix
declaration. It's the server that declares the prefixes on the stream
from the server to the client:
<message sm:xmlns='something' to='user at a.example.com'
from='user at b.example.com'><sm:something/></message>
Tot kijk
Matthias
More information about the Standards-JIG
mailing list