On 11.06.2004 12:42, Ole Hildebrandt wrote:

Hi,

I have any XML-Inputstream containing CDATA-Sections (With HTML-Markup). When I directly serialize the generators output to HTML the HTML-Markup is applied. But as soon as I process the Data with an XSL-STylesheet, the Markup is Excaped (&lt,b> etc) and not applied anymore. I tried to declare the CDATA-ELements in xsl:output cdata-section-elements, but this doesn't seem to have any effect. Did anyone come across this problem and found a solution?

Here is the  Stylesheet I use for testing

<xsl:output method="xml" cdata-section-elements="TEASERBODY"/> <xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>

1. This is more or less an XSLT question and so this is not the appropriate list.


2. The Cocoon part of the question is the ignoring of xsl:output, you have to add the @cdata-section-elements to the serializer component declaration in the sitemap.

3. The behaviour you see is standard behaviour for XML "lifecycle" parse/transform/serialize. There is no difference between non-escaped markup in CDATA and escaped one outside of CDATA. So besides easier human reading there is no need for having CDATA sections.

Joerg


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to