Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 37013 invoked by uid 500); 18 Jul 2002 17:53:25 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 37002 invoked from network); 18 Jul 2002 17:53:25 -0000 Message-ID: <601F6322AD71D5118D6C0003472515290660CF35@sjmemexc1.stjude.org> From: "Hunsberger, Peter" To: "'cocoon-users@xml.apache.org'" Subject: return nodeset from action? Date: Thu, 18 Jul 2002 12:53:27 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Is it possible to return a parameter containing a NodeSet from a Cocoon action? If I was running an Xalan based servlet I could call a transform with a parameter that was in fact an org.apache.xpath.NodeSet. I'd like to do the equivalent in Cocoon. If I just do this directly Cocoon appears to wrap the results as a String before passing it on to the transformer? In my action I use code like: map.put( "msgs", (NodeSet)myobject.getMsgs() ); where the getMsgs method returns a nodeset of 1 or more nodes that I'd then like to reference inside an XSLT. When I reference the parameter in my XSLT (using xsl:copy-of select="$msgs") I get org.apache.xpath.NodeSet@90fd20 indicating that the Nodeset has been converted to a String at some point before I'm referencing it. The site map looks like: I suspect the problem is passing the parameter back via the sitemap. However, if I don't do this I don't see the parameter in the XSLT at all. I'd guess there is some magic parameter that tells Cocoon to pass the parameters from the action map back to the transform as parameters? Testing with: or as parameters to the map:transform did not give the desired results... Looking at the source doesn't reveal any particular magic to handle this. My action just extends abstract action, but I don't see any other action that would yield any other results? Failing this capability, how else does one return structured data from an action to a XSLT? (We do not want to use XSP's for this particular set of transformations...) I'm running Cocoon 2.0.3 (thanks for the many fixes and improvements :-) with Tomcat 4.0.4 / JBoss 2.4.4 and JDK 1.4 Peter Hunsberger Phone: 901-495-5252 E-mail: Peter.Hunsberger@stjude.org --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: