[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [jira] Commented: (JXPATH-125) JXPathContext.iteratePointers() does
From: "Matt Benson (JIRA)" <jira () apache ! org>
Date: 2010-02-27 18:37:05
Message-ID: 1826927718.13771267295825879.JavaMail.jira () brutus ! apache ! org
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/JXPATH-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839283#action_12839283 \
]
Matt Benson commented on JXPATH-125:
------------------------------------
After much delay...
Committed revision 917007.
Thanks!
> JXPathContext.iteratePointers() does not work with multiple prefixes for a single \
> namespace URI
> -----------------------------------------------------------------------------------------------
>
> Key: JXPATH-125
> URL: https://issues.apache.org/jira/browse/JXPATH-125
> Project: Commons JXPath
> Issue Type: Bug
> Affects Versions: 1.2 Final, 1.3
> Environment: JXPath 1.2
> Sun JDK 1.5.0_13
> Reporter: Christian Koppen
> Fix For: 1.4
>
> Attachments: TestcaseJXPathIterateBug.java
>
>
> Have a look at the following document:
> <a:doc xmlns:a="ns">
> <a:elem />
> <b:elem xmlns:b="ns" />
> </a:doc>
> We have two elements 'elem' in the same namespace 'ns'.
> They have a different prefix, however.
> When we use JXPathContext.iteratePointers() to iterate over them, the first element \
> is returned two times. The second element is not returned. This is because
> in class org.apache.commons.jxpath.ri.model.dom.DOMNodePointer
> in method getRelativePositionByName() (line 546)
> we have:
> if (nm.equals(node.getNodeName()))
> In the example, we have
> nm == "a:elem" and node == "b:elem"
> Thus, equals() returns false. But since 'a' and 'b' are just different prefixes for \
> the same namespace URI, we should have 'true'. I attached a testcase which \
> reproduces the bug.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic