From: "David Megginson" <[EMAIL PROTECTED]>
> James Strachan writes:
>
>  > Yes I'm the guilty person who added DOM support - sorry it was hidden
away
>  > in CVS and not on the site or in a release. Lets merge the two together
if
>  > there's things missing or wrong or done badly etc.
>
> Great -- you'll want to add it to the FAQ as well, since the FAQ talks
> about how someone *could* add W3C DOM support.

Will do.

> How did you deal with the attribute-node problem?  I used a wrapper
> class that tracks parent information, but that won't work if the
> initial context node is itself an attribute (since the parent will be
> untraceable).

I didn't :-)

I think incorporating your idea of a wrapper is a good idea. We maybe need
to add a hook to the Navigator interface to allow us to 'unwrap' any wrapper
to return a real DOM node, rather than our wrapper, in the XPath result set.

Also I agree, that if a DOM Attribute node is the root of the XPath query
the parent will be untraceable.


> What about Namespace nodes?  What I *didn't* think of was actually
> looking at the xmlns* attributes for all the ancestor elements -- that
> would give complete Namespace axis support.

Thats what I did - both the DOM and EXML navigators use the xmlns*
attributes.

Though there still seems to be confusion over exactly what the namespace
axis is meant to do. We've some example XPath queries in xml/test/tests.xml
that we are still not quite sure of the correct answer. I *think* DOM, dom4j
and EXML all support the namespace axis properly but it could be our tests
are wrong.

BTW I return the xmlns* Attribute nodes as 'namespace nodes' results as
well.

Regards

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to