Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353373

Summary: [xpath2] "preceding" & "following" axes behavior is erroneous
Product: [WebTools] WTP Source Editing Reporter: Mukul Gandhi <mukul.gandhi>
Component: wst.xpathAssignee: Project Inbox <wst.xsl-inbox>
Status: NEW --- QA Contact: Jesper Moller <jesper>
Severity: normal    
Priority: P3 CC: d_a_carver, jesper
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Mukul Gandhi CLA 2011-07-28 19:55:24 EDT
Build Identifier: 20110615-0604

I've observed that XPath reverse axes behavior doesn't work correctly as expected, in PsychoPath engine. Most significantly, the logic of "preceding" axis seems to be somewhat wrong. The "preceding" as well as other reverse XPath axes don't return the correct node when referred by expressions like, preceding::*[1] (or preceding-sibling::*[1], ancestor::*[1] etc). An indexed references to an XDM node like this currently doesn't return the node in "reverse document order" (it seems to be returning the nodes opposite to the reverse order).

I'll be committing an improved implementation related to this, shortly.

Reproducible: Always
Comment 1 Mukul Gandhi CLA 2011-07-28 20:17:26 EDT
I've committed the changes to the service branch. Still not been able to commit to the HEAD location due to the API changes that have happened recently (will try to commit changes to HEAD location asap).

Also added a test case stub to HEAD location (which is non-executable currently, and will be used when the corrections for this bug get committed to the HEAD).

Thanks.
Comment 2 Mukul Gandhi CLA 2011-07-29 10:42:54 EDT
committed improvements to "following" axis implementation as well on the service branch. updated the test stubs on HEAD.

will have the logic for the bug fixes in this report, in sync to HEAD location asap.