commons-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/JXPATH-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15052394#comment-15052394
] 

Stefan Albrecht commented on JXPATH-188:
----------------------------------------

Some clarification from specification on w3.org - about whether ancestor is indeed reverse
axis:
XPATH 1.0:
http://www.w3.org/TR/xpath/#predicates  (Section 2.4)
(...)Thus, the ancestor, ancestor-or-self, preceding, and preceding-sibling axes are reverse
axes; all other axes are forward axes (...)

XPATH 3.1:
http://www.w3.org/TR/xpath-31/#prod-xpath31-ReverseAxis
ReverseAxis ::= ("parent" "::") | ("ancestor" "::") | ("preceding-sibling" "::") | ("preceding"
"::")| ("ancestor-or-self" "::")

(and: sorry for causing efforts due to junit 4 tests...)

> Ancestor: not reverse axis in case of org.w3c.dom documents
> -----------------------------------------------------------
>
>                 Key: JXPATH-188
>                 URL: https://issues.apache.org/jira/browse/JXPATH-188
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Stefan Albrecht
>         Attachments: AncestorTest.java, AncestorTest.java
>
>
> 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
(v6.3.4#6332)

Mime
View raw message