Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: preserving markup >Thread Next - Re: preserving markup Re: preserving markupTo: NULL Date: 6/6/2008 4:29:00 PM If your stylesheet needs to force the content of some elements to be
> output as a CDATA section to support broken downstream processing, use
> xsl:output's cdata-section-elements attribute.
Thanks for the quick response Joel. Not sure what you mean by 'broken
downstream processing'. I'm outputing HTML (and Javascript), not XML.
cdata-section-elements appears to be appropriate only where
method=xml. Perhaps I'm missing something?
Is this what you had in mind?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
<xsl:output omit-xml-declaration="yes" method="html" cdata-section-
elements="code"/>
<xsl:template match="code">
<div style="MARGIN-LEFT: 30px">
<xsl:value-of select="." />
</div>
</xsl:template>
</xsl:stylesheet>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
