[jdom-interest] Is JDOM dying?

Jason Hunter jhunter at servlets.com
Sun Mar 16 11:48:17 PST 2003


There's two ways to look at an XML model.  One is classes which simulate
the XML text representation.  Another is classes which simulate the
fundamental structure and meaning of the XML.  JDOM has decided to model
the meaning, not the text, and has done so correctly.  We're not going
to change.

We chose to model the "meaning" for many reasons.  There are arguments
for going the other way, but they weren't (and still aren't) as
compelling.

Now, I do think within the "meaning" model it would be handy to have an
elt.getChild("foo") that didn't require always passing in the same old
namespace like elt.getChild("foo", SAMEOLDNS).  That's what trips up
most people.  Unfortunately we shouldn't treat no namespace the same way
as a parent namespace.  It's inconsistent.  One option is to have a
wildcard like elt.getChild("foo", ANY) which follows the XQuery (XPath?)
precedent of using a * to match any namespace such as
/*:foo/*:bar/text().  But is ANY better than SAMEOLDNS?  Not really.

-jh-



More information about the jdom-interest mailing list