[jdom-interest] xmlns="" in children elements of root

philip.nelson at omniresources.com philip.nelson at omniresources.com
Wed Aug 29 09:54:54 PDT 2001

> Yet, I agree with Rodney that if you define a default 
> Namespace one can expect 
> the constructor with no Namespace argument to use the default 
> Namespace.
> This is not an issue of whether JDOM is right or wrong but 
> rather of how 
> intuitive the JDOM API is and should be.
> Laurent

Since I argued your point in those earler discussions, I can only agree with
you that the api as it stands does not follow what intuition would dictate.
However, I came to accept the api the way it is because,  first, it really
is pretty easy to use, and second, this approach puts the least amount of
processing burden on the api.  To look upward for namespace declarations,
which JDOM does not model anyway, would have be done on very single insert
and anytime the namespaces were changed.  This way really is simpler and
faster I think.

The JDOM approach to namespaces is really simple and can be described in a
simple story (thanks Jason for that phrase which I use a lot these days
;-)).  Each element has a namespace and you are responsible to assign it in
your code.

More information about the jdom-interest mailing list