You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Matt Benson (JIRA)" <ji...@apache.org> on 2008/03/10 22:22:46 UTC

[jira] Updated: (JXPATH-12) Descendant or self axis does not work correctly at root node

     [ https://issues.apache.org/jira/browse/JXPATH-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson updated JXPATH-12:
------------------------------

    Summary: Descendant or self axis does not work correctly at root node  (was: [jxpath] Descendant or self axis does not work correctly at root node)

> Descendant or self axis does not work correctly at root node
> ------------------------------------------------------------
>
>                 Key: JXPATH-12
>                 URL: https://issues.apache.org/jira/browse/JXPATH-12
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.2 Final
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Simon Raess
>             Fix For: 1.3
>
>         Attachments: DescendantOrSelfTest.java, patch.jxpath-12.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.