Tammo van Lessen created ODE-1027:
-------------------------------------
Summary: Variables as number predicates don't work with XPath 1.0
Key: ODE-1027
URL: https://issues.apache.org/jira/browse/ODE-1027
Project: ODE
Issue Type: Bug
Affects Versions: 1.3.6
Reporter: Tammo van Lessen
Fix For: 1.3.7, 1.4
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)