[jdom-interest] Is JDOM dying?

Malachi de AElfweald malachi at tremerechantry.com
Mon Mar 17 21:53:42 PST 2003

Well, I have kinda assumed nothing would change about a month ago...  but
everyone seems to be getting stuck on the idea that this is some pseudo- 
or special-case, or.... It's not... it may seem that way because of the way
JDOM handles it, but it is the most common way from the textual point of 
As per w3cschools examples, et al.


On Mon, 17 Mar 2003 15:00:41 -0800, Jason Hunter <jhunter at servlets.com> 

> Malachi de AElfweald wrote:
>> Well, inherit and any don't really mean the same thing...
>> I see there being four possible meanings:
>> new Element("foo", Namespace.NONE)
>> new Element("foo", Namespace.ANY)
>> new Element("foo", Namespace.INHERIT) // or null
>> new Element("foo", someOtherNS);
>> Following the way most Java APIs work, and the textual representation
>> of XML, the 3rd would be the one exected from not passing any namespace - 
>> --
>> ie: new Element("foo") should not add a namespace declaration. But, in 
>> fact
>> it does, because JDOM does the first... So, by NOT passing a Namespace 
>> to
>> the constructor, JDOM adds ns="" to the output...  That is the root of 
>> this
>> entire conversation.  There needs to be a way to say
>> Defaults are fine, but if you are going to default to something that
>> doesn't
>> match the output, you need a way to override it.
>> Malachi
> There's no way I'm going to sign off on an Element being in a special
> pseudo-namespace that's determined depending on where it's later placed
> within the document.  You should know at construction time the namespace
> of "foo", and you should be able to tell the constructor.
> -jh-


More information about the jdom-interest mailing list