[jdom-interest] Is JDOM dying?

Philip Nelson panmanphil at yahoo.com
Sat Mar 15 05:58:18 PST 2003


--- Malachi de AElfweald <malachi at tremerechantry.com> wrote:
> I disagree.  If you read in the XML, the ns attribute is only on
> the root element. JDOM interprets that as it being on all children node.

Somehow, we need a better FAQ on this, ideally with links to the very, very,
very long series of threads on it, which we seem doomed to repeat.

FAQ 1 - it's not our fault! namespaces were poorly thought out, and applied
before their practical application was understood

FAQ 2 - JDOM doesn't put the attribute on the other elements, the parser does
via SAX (and jdom's interpretation of the events) or by DOM.  The text
representation is not the same thing as what it means, and JDOM, DOM, (XOM,
.net, etc...) represent what it means when represented in a tree model.

The end result of those long arguments about this was a simple realization that
where you want namespaces to automatically get propagated, a trivial factory
method for your application handles simply and elegantly.  It falls under the
realm of refactoring redundant code.



More information about the jdom-interest mailing list