cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Clarification Re: How to Call Servlets, CGIs on your server and other servers
Date Tue, 19 Sep 2000 16:46:15 GMT

I wasn't sure if you were referring to my question...
But, just to make a note...I am using the second method, (B).
As I mentioned, my servlet returns an XML tree as a big string (see my
previous e-mail) but the problem I have is I don't know how in my XSP
translate the servlet response as a tree instead of string so that I can
later iterate through elements of the tree and print them.

e.g.  in the stylesheet below, the for-each loop never gets executed or hit
because the whole tree that was returned by my servlet is treated as 1
element (specifically, the child of "GetCategories" element) instead of
separate subelements of my GetCategories.   If I replace the whole for-each
loop below with <xsl:value-of select="."/> then I get the whole tree
printed but that's not what I want.

<xsl:template match="GetCategories">
  <xsl:text>List of Categories</xsl:text> <br/>
         <xsl:for-each select="Category">
         <xsl:value-of select="Name"/>
                        <xsl:value-of select="Description"/>

I want my XML file for the dynamice part look like below after servlet call
and xsp processing:


<!-- begin of dynamic data from servlet -->


So, is it feasible to do what I want?

View raw message