You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Uwe Barthel (JIRA)" <ji...@apache.org> on 2015/11/21 09:46:11 UTC
[jira] [Commented] (JXPATH-176) Pipe not working correctly in
xpaths
[ https://issues.apache.org/jira/browse/JXPATH-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15020333#comment-15020333 ]
Uwe Barthel commented on JXPATH-176:
------------------------------------
[~xarx]: Could you provide a small test case?
> Pipe not working correctly in xpaths
> ------------------------------------
>
> Key: JXPATH-176
> URL: https://issues.apache.org/jira/browse/JXPATH-176
> Project: Commons JXPath
> Issue Type: Bug
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise, JDK 1.8.0
> Reporter: Martin Xarx
>
> It seems to me that "pipes" do not work reliably in JXPath, or at least not for java containers:
> xpath: size(x/name|name), result: 0
> xpath: x/name|name, result: ROOT name
> xpath: (x/name|name), result: ROOT name
> while there is:
> xpath: size(name), result: 1
> xpath: name, result: ROOT name
> xpath: (name), result: ROOT name
> xpath: size(x/name), result: 1
> xpath: x/name, result: X name
> xpath: (x/name), result: X name
> The data model is like this:
> {
> "name" : "ROOT name",
> "x" : {
> "name" : "X name"
> }
> }
> and the context is set to the root node. I'm using the following code:
> JXPathContext xpathContext = JXPathContext.newContext(root);
> Pointer p = contextContext.getPointer(xpath);
> return p.getNode();
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)