[jdom-interest] XmlOutputter - printNamespace - NO_NAMESPACE outputs xmlns="", bug?

Eric VERGNAUD eric.vergnaud at wanadoo.fr
Fri Jul 4 17:36:04 PDT 2003


le 3/07/03 17:36, Elliotte Rusty Harold à elharo at metalab.unc.edu a écrit :

> It's an idea, just a bad one. We've been over this umpteen-dozen
> times. What you are asking for is based on a fundamental
> misunderstanding of namespaces in XML. That's not surprising.
> Namespaces in XML is a messy, poorly designed spec that confuses
> people. But it would be far more confusing for JDOM to try to fix
> this. The solution JDOM has is the right one. Every element has a
> name and a namespace. Neither the name nor the namespace changes
> without an explicit request to do so.

Sorry, but I think you're missing my point.

Currently, the behaviour of the Element(String) constructor is to set the
namespace to NONAMESPACE. This is NOT an explicit request , is it ?

This has nothing to do with understanding XML namespaces, which -thanks to
all contributors on this subject- I think I perfectly understand.

It's merely an API issue (to make dummy programmer's life -like mine-
easier).

Since JDOM is ALREADY providing some default behaviour (and I'm glad it
does!) which is NOT explicit, all I'm asking for is to allow another
optional behaviour.

The ayatollahs would still be allowed to call Element(String,Namespace).

The experts could continue to call Element(String).

And dummies like myself could write Document.setOption(inheritNamespaces),
and go on with simple code.

Would someone on this list be less happy if dummies are more happy ?

Eric




More information about the jdom-interest mailing list