You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kees Jongenburger <ke...@netlinq.nl> on 2000/05/03 18:18:17 UTC

XSP adding XML java.

Hi, 

i am currently writing a poll class witch should be used as part of an XSPlib
to be incorporated with different pages. Now the poll class should return part 
of an XML document something like
this:
<poll>
	<question>
	    <title>Should Cocoon have default polls?</title>
	    <answers>
		    <answer name="Yes Yes Yes!!!" value="yes"/>
		    <answer name="No No No!!!" value="yes"/>
	    </answers>
	</question>
</poll>

my xsl(from the lib) looks like this:
<xsl:template match="netlinq:poll">
        <xsl:copy>
             <xsp:expr>forum.getForum()</xsp:expr>
        </xsl:copy>
</xsl:template>


Now in java if i return a String the < and > tags are transformed so that
the exact text is displayed . If i return an XObject results are better
(only the #text is returned but the tags are omited)

what should the aproch be? 
i realy whant to be able to use "Pure" java to create document fragments witch 
wil be processed by the xslt

Kees Jongenburger