Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.3.6
-
None
Description
When variables are used as number predicates to select a specific node, in XPath 1.0 the variable value is treated as string and not properly casted to a number. Thus, Jaxen will select all nodes and not a single node. This can be fixed by added a special cast to org.apache.ode.bpel.elang.xpath10.runtime.JaxenContexts.getVariableValue(String, String, String) – in the same way as Booleans are treated.
As a workaround, the variable can be casted in the XPath expression itself, so instead of tns:args[$Counter]/tns:name you can write tns:args[number($Counter)]/tns:name.