[JDEV] Namespaces vs. Attributes

Ari Johnson ari at godspeed.lusis.org
Tue Jul 16 00:55:03 CDT 2002


On Mon, 15 Jul 2002, Matthias Wimmer wrote:

> Hi David!
> 
> David Waite wrote:
> 
> > 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.
> 
> I don't see why this should break interoperability. The server just has 
> to send the known prefixes and namespace declarations to the clients 
> (which is perfectly well formed XML) and handle incoming XML with 
> correct namespace processing.

It might be harder than that, actually.  But I don't know enough about it
to say for sure.

> The only thing will be that this will consume more memory per user on 
> the server because it has to store all the namespace definitions the 
> client has send.

That could be partially alleviated by requiring explicit namespace
specification rather than allowing prefixes to be defined.  It's hard to
make an XML library that automatically realizes when a namespace prefix
can be used instead of the full name, unless you have it keep track of the
nicknames per node and then have another function to call to look it up
for code that's reading it; but that gets plenty kludgy on its own.
 -- Ari





More information about the JDev mailing list