[JDEV] Namespaces vs. Attributes
David Waite
mass at akuma.org
Mon Jul 15 01:23:10 CDT 2002
Ari Johnson wrote:
>Looking at the jabberd code, it does indeed treat these as xmlns and
>xmlns:stream attributes on the element. Can anyone explain the reasoning
>behind this method, or if a fix might be possible without severely
>injuring the Jabber server itself? I really don't want to have to
>redesign my project around an incorrect subset of the XML standard if I
>can avoid it. Thanks.
>
This (together with the 'jabber:server' / 'jabber:component:accept'
namespace usage) would be rather difficult to fix at this point without
breaking interoperability with nearly every client, server, and server
component - many of these use custom parsers which do not have any
support for namespaces, and rely on a particular prefix just like the
open-source server.
Another problem is the way data gets multiplexed and demuxed throughout
the server. A single inter-server connection will represent a subset of
users, and this requires the appropriate portions of those 'user'
documents to be represented in the 'inter-server' document.
Currently, first-level elements are treated as independant sub-documents
when being routed, because namespaces are ignored - namespaces are the
only construct which really requires this subset to be dependant on its
ancestors. The sub-documents ("XML chunks") are simply assumed to have a
set of namespaces required by the base document - any other declared
namespaces are not added to the opposite document for correctness. For
proper namespace support, all first-level elements would need to be
reprocessed at some level to make them suitable for importing into a new
document.
In short, I don't think it is really anything that can be cleverly
hacked in. Either a lot of things will break, or a lot of logic will
need to be added for supporting legacy clients/servers. It has been off
and on the roadmap for the open-source server, but I don't believe it
will ever be changed/fixed until someone who actually cares decides to
change/fix it.
-David Waite
More information about the JDev
mailing list