You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rick Tyler <ri...@ticketweb.com> on 2000/02/17 23:24:11 UTC
XSP/XSL problem w/ < > and "
I am using XSP to generate an XML fragment as follows:
<?xml version="1.0"?>
<?xml-stylesheet href="test.xsl" type="text/xsl"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<page>
<text> <!-- sends output to browser as plain text -->
<xsp:logic>
<xsp:content>
<xsp:expr><![CDATA["<foo>bar</foo>"]]></xsp:expr>
</xsp:content>
</xsp:logic>
</text>
</page>
</xsp:page>
When I view the resulting output in my browser's SOURCE viewer,
I see this:
<foo>bar</foo&;gt
when I really want to see this:
<foo>bar</foo>
My goal is for Cocoon to apply XSL transformations to
XML tags generated using XSP. When I first tried that,
none of my XSP-generated tags seemed to be recognized,
so I enclosed everything in a simple <text/> block
OUTSIDE of the <xsp:logic> block to see what was going
on. It was only then that I noticed what was happening
to my output.
I am surmising that the translations from "<" to "<"
takes place before the XSL transformations are applied,
which would explain why the XSL engine doesn't recognize
them.
I did see a note in the FAQ about xalan having problems
with &;lt and > with the suggested solution of substituting
XT. I did try that, but see no change in the behavior I
as seeing.
Is there a way around this behavior?
Thanks,
- RT