Author: jeff.yuchang
Date: 2010-11-24 06:01:26 -0500 (Wed, 24 Nov 2010)
New Revision: 1142
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java
Log:
*RIFTSAW-312, fix the boolean data type.
Modified:
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java
===================================================================
---
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java 2010-11-24
10:58:52 UTC (rev 1141)
+++
branches/ODE/RiftSaw-ODE-trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/JaxenContexts.java 2010-11-24
11:01:26 UTC (rev 1142)
@@ -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;
}