[jdom-interest] Is JDOM dying?

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Mar 21 00:22:45 PST 2003


At 11:19 PM -0800 3/14/03, Malachi de AElfweald wrote:
>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 counter-
>intuitive.
>

It's only counter-intuitive because namespaces are counter-intuitive. 
The way JDOM works is very intuitive to those developers who have 
grokked how XML namespaces work. Anything else would be 
counter-intuitive to those developers who do understand namespaces. 
JDOM is here faithfully modelling the counter-intuitiveness of 
namespaces. Yes, XML namespaces are a poorly designed mess; but we 
can't fix that in JDOM.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list