[
https://issues.apache.org/jira/browse/JXPATH-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15027602#comment-15027602
]
Michele Vivoda commented on JXPATH-182:
---------------------------------------
I think I understood why the path for Map is done in that way: to support keys
that are not valid XML names, the test {{testAttributeName}} shows this.
However it could be used only when the name is not a valid XML name and use the
standard {{foo/bar}} syntax in the other cases.
> asPath() returns XPath that can't be found in the context
> ---------------------------------------------------------
>
> Key: JXPATH-182
> URL: https://issues.apache.org/jira/browse/JXPATH-182
> Project: Commons JXPath
> Issue Type: Bug
> Reporter: Evgeniy Sharapov
> Attachments: JXPath182Test.java, JXpath182Test.java
>
>
> When I get the pointer and then call its {{asPath}} method and use that path
> to find a pointer in the same context {{JXPathContext}} can't find it.
> In the attached test
> I get the pointer by using {{"data[1]/data[1]"}}
> {{asPath()}} then returns {{"/.[@name='data'][1][@name='data'][1]"}}
> But in fact it should be {{/.[@name='data'][1]/.[@name='data'][1]}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)