cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Fellenz <>
Subject XSP is encoding an XML string generated by Java code
Date Thu, 12 Oct 2000 20:58:14 GMT
Given the following .xml and .xsp files [respectively]:
----- example-page.xml ----------------------------------------
<?xml version="1.0"?>
<!-- Author: Alan Uhl" <> " -->
<!-- Version: $Id: example-page.xml,v 1.2 2000/10/12 Uhl $ -->
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="page-xsp.xsl" type="text/xsl"?>

----- page-xsp.xml ----------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
   xmlns:xsl="  <>"
   xmlns:xsp="  <>"
  <xsl:template match="page">
<xsl:processing-instruction name="cocoon-process">type="xsp"</xsl:processing
    <xsp:page language="java" xmlns:xsp="  <>">
      private synchronized String foofunc() {
        String retval = <![CDATA["<foobar><name>Asmodius</name><age>99yo</age><g
        return retval;
  <xsl:template match="foobartag">
what we get is:

what we would like:
The "foofunc()" is a mockup function that, in real life, will 
return data from some external datasource [such as MySQL]. 
Prior to being returned from foofunc(), the data will be 
wrapped in XML tags. We would like to have the data remain 
"as is" for processing by a secondary XSL transformation, 
yielding the HTML product. But, as you can see, the 
beginning and ending brackets ("<", ">") are being converted 
to &lt and &gt.
-Bob <> 

View raw message