Author: mriou
Date: Mon Sep 11 14:37:55 2006
New Revision: 442357

URL: http://svn.apache.org/viewvc?view=rev&rev=442357
Log:
Setting the context node for XPath evaluation with correlation properties.

Modified:
    
incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java

Modified: 
incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
URL: 
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java?view=diff&rev=442357&r1=442356&r2=442357
==============================================================================
--- 
incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
 (original)
+++ 
incubator/ode/trunk/bpel-el-xpath20/src/main/java/org/apache/ode/bpel/elang/xpath20/runtime/XPath20ExpressionRuntime.java
 Mon Sep 11 14:37:55 2006
@@ -170,7 +170,8 @@
             xpe.setNamespaceContext(oxpath20.namespaceCtx);
             // Just checking that the expression is valid
             XPathExpression expr = 
xpe.compile(((OXPath10Expression)cexp).xpath);
-            Object evalResult = expr.evaluate(DOMUtils.newDocument(), type);
+
+            Object evalResult = expr.evaluate(ctx.getRootNode() == null ? 
DOMUtils.newDocument() : ctx.getRootNode(), type);
             if (evalResult != null && __log.isDebugEnabled())
                 __log.debug("Expression " + cexp.toString() + " generated 
result " + evalResult
                         + " - type=" + evalResult.getClass().getName());


Reply via email to