svn commit r18806 - trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

svn commit r18806 - trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino

Keith Chapman-4
Author: keith
Date: Wed Jul  2 10:56:11 2008
New Revision: 18806
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18806

Log:
Fixing Mashup-882


Modified:
   trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java

Modified: trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java
URL: http://wso2.org/svn/browse/wso2/trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java?rev=18806&r1=18805&r2=18806&view=diff
==============================================================================
--- trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java (original)
+++ trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java Wed Jul  2 10:56:11 2008
@@ -1201,6 +1201,15 @@
             OMNode[] omNodes = list.getAxiomFromXML();
             if (omNodes.length == 0) {
                 return element;
+            } else if (omNodes.length == 1) {
+
+                // If the XMLList returned has only one child we annotate it as XML
+                element.addChild(omNodes[0]);
+                if (addTypeInfo) {
+                    element.addAttribute("type", "xml", namespace);
+                    element.declareNamespace(xsNamespace);
+                    element.addAttribute("type", "xs:anyType", xsiNamespace);
+                }
             } else {
                 for (int i = 0; i < omNodes.length; i++) {
                     element.addChild(omNodes[i]);

_______________________________________________
Wsf-javascript-dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev
Loading...