commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Vivoda (JIRA)" <>
Subject [jira] [Commented] (JXPATH-188) Ancestor: not reverse axis in case of org.w3c.dom documents
Date Fri, 11 Dec 2015 17:12:10 GMT


Michele Vivoda commented on JXPATH-188:

No problem at all for the test.

Interesting that now parent is a reverse axes, it must be needed now for something, since
for XPath I have read that for one-node axes it does not matter whether they are reverse or

I found why selectSingleNode is wrong in JXPath, it does not consider that with reverse axes
must iterate all items and get the last, instead of just getting the first. Probably this
happened because it is what one (you, me) expects and is more efficient, but is not how the
others (JAXP) work. I also found out that {{getDocumentOrder()}} is not implemented on some
reverse axes where it probably should. These changes are complex, break some tests and I am
still not sure about their consequences, still working on them..

> Ancestor: not reverse axis in case of org.w3c.dom documents
> -----------------------------------------------------------
>                 Key: JXPATH-188
>                 URL:
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Stefan Albrecht
>         Attachments:,
> XPath specifies the ancestor axis to be a reverse axis, thus I would expect that JXPath
delivers results along the reverse axis. This works, if applied to a context wrapping a poje,
but not if the context wraps an org.w3c.dom document.
> I attached a JUnit test for this (but, unluckily, not a patch...)

This message was sent by Atlassian JIRA

View raw message