[jdom-interest] Is JDOM dying?

Malachi de AElfweald malachi at tremerechantry.com
Fri Mar 14 23:19:35 PST 2003

But I think he was right in saying that it is a representation issue.
When reading the textual representation of XML, you see the ns attribute
on the root element, and no others. So, you try to write your JDOM elements
that way, and it doesn't work -- because JDOM adds another ns="" to the
children... So, to mimic the textual representation of only having the ns
attribute on the root node, you have to put it on all the nodes. Very 

I am not saying that Namespace.INHERIT is correct -- but I would have to 
that all the complaints on the list show that it is not clean and 
Moreover, the fact that someone new to JDOM can not just create the JDOM 
directly from looking at the textual representation shows an obvious 
problem with
the design.

I do understand how it works now, after lengthy emails on this list.  But 
it is NOT
intuitive to say "if you only want a 'ns' attribute on the root element, 
put it on
every Element" or to say "if you only put the ns attributes where the 
textual representation
shows them, we will add some extra ones for you that disable inheritance"


On Fri, 14 Mar 2003 07:46:35 -0500, Elliotte Rusty Harold 
<elharo at metalab.unc.edu> wrote:

> At 8:56 AM +0100 3/14/03, Stephan Trebels wrote:
>> Would it be a workable compromise  to have a Namespace.INHERIT for an
>> Element as a possible namespace argument?
> I wouldn't accept such a compromise. It's ugly. Right now the JDOM 
> namespace story is clean and consistent. This proposal says it changes 
> depending on whether or not you set Namespace.INHERIT. Too many options 
> just create a baroque API that's hard to learn, hard to teach, and hard 
> to use. Generally when faced with two possible ways of accomplishing 
> something, it's better to pick one than to pick both.


More information about the jdom-interest mailing list