DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38586

           Summary: Descendant or self axis does not work correctly at root
                    node
           Product: Commons
           Version: 1.2 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: JXPath
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Given the following XML document: <root id="1234"/>
and the XPath: //root/@id/text().

JXPath returns null instead of "1234".

JXPathContext context = JXPathContext.newContext(doc);
assertEquals(value, context.selectSingleNode("//root/@id/text()"));

The attached JUnit test highlights the problem. It seems that JXPath does not
find the root node if it is accessed with the axis descendant-or-self.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to