Author: jeff.yuchang
Date: 2010-11-24 05:58:52 -0500 (Wed, 24 Nov 2010)
New Revision: 1141
Modified:
branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java
Log:
*RIFTSAW-312.
Modified:
branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java
===================================================================
---
branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java 2010-11-24
08:08:09 UTC (rev 1140)
+++
branches/RiftSaw-ODE-2.2.x/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java 2010-11-24
10:58:52 UTC (rev 1141)
@@ -68,6 +68,8 @@
/** Static, thread-safe singleton implementing default XPath functions */
private static final FunctionContext __defaultXPathFunctions =
XPathFunctionContext.getInstance();
+
+ private static final QName BOOLEAN = new
QName("http://www.w3.org/2001/XMLSchema", "boolean");
private OXPath10Expression _oxpath;
private EvaluationContext _xpathEvalCtx;
@@ -186,7 +188,13 @@
}
if (_xpathEvalCtx.narrowTypes() && type instanceof
OXsdTypeVarType && ((OXsdTypeVarType)type).simple) {
- return variableNode.getTextContent();
+ String value = variableNode.getTextContent();
+ OXsdTypeVarType theType = (OXsdTypeVarType)type;
+
+ if (BOOLEAN.equals(theType.xsdType)) {
+ return new Boolean(value) ;
+ }
+ return value;
} else {
return variableNode;
}