[jdom-interest] JDOM && Jaxen

bob mcwhirter bob at werken.com
Wed Aug 1 13:17:10 PDT 2001

> XPath was clearly created with DOM in mind and without much regard to
> other potential object models, and as a result providing XPath support
> in other object models drives the models to approach DOM in look and
> feel.

Though, fwiw, dom4j and EXML both support these XPaths.  dom4j can
'unflyweight' its Namespaces when needed, and EXML exposes them simply
as Attributes on Elements.

> In the abstract sense, counting namespace declarations is a relatively
> useless query because it says nothing about the semantics of the
> document but only tells you about one arbitrary textual representation.

Yah, sure, it's a useless XPath expression, but it stands between
us and full XPath compliance.

> Of course, you can determine the right answer without parentage. 
> XMLOutputter has the ability already to put the namespace decls where
> they belong.  It requires using a namespace stack to track what's in the
> hierarchy when examining an element.  It makes moving elements fast and
> easy and reliable (since their namespaces won't change as a result of
> placements) but makes output have to do a bit more examination to
> determine where decls are to be placed.
> Is any of this helpful?  :-)

Maybe.  I guess I'm trying to determine is:

	What, if any, namespaces are declared for element X.


More information about the jdom-interest mailing list