Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353373 - [xpath2] "preceding" & "following" axes behavior is erroneous
Summary: [xpath2] "preceding" & "following" axes behavior is erroneous
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jesper Moller CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 19:55 EDT by Mukul Gandhi CLA
Modified: 2011-07-29 10:42 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.