ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karth...@apache.org
Subject svn commit: r786682 - /ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java
Date Fri, 19 Jun 2009 21:54:15 GMT
Author: karthick
Date: Fri Jun 19 21:54:15 2009
New Revision: 786682

URL: http://svn.apache.org/viewvc?rev=786682&view=rev
Log:
If the XQuery evaluates to a document, use its element as the result value.

Modified:
    ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java

Modified: ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java?rev=786682&r1=786681&r2=786682&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java
(original)
+++ ode/branches/APACHE_ODE_1.X/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xquery10/runtime/XQuery10ExpressionRuntime.java
Fri Jun 19 21:54:15 2009
@@ -577,8 +577,10 @@
 
             while (result.next()) {
                 Object itemValue = getItemValue(result.getItem());
-                if (itemValue instanceof Node) {
-                	itemValue = DOMUtils.cloneNode(document, (Node) itemValue); 
+                if (itemValue instanceof Document) {
+                	itemValue = DOMUtils.cloneNode(document, ((Document) itemValue).getDocumentElement());
+                } else if (itemValue instanceof Node) {
+                	itemValue = DOMUtils.cloneNode(document, (Node) itemValue);
                 }
 
                 if (itemValue != null) {



Mime
View raw message