This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
CDATA question
- From: Amy Cheung <amy_cheung_99 at yahoo dot com>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Tue, 18 Jun 2002 11:09:37 -0700 (PDT)
- Subject: [xsl] CDATA question
- Reply-to: xsl-list at lists dot mulberrytech dot com
Is there a way to transform a CDATA section into a
CDATA section with the same text?
What I mean is, for example, turn this
<init-param>
<![CDATA[<style>abc</style>]]>
</init-param>
into
<init-param>
<![CDATA[<style>abc</style>]]>
</init-param>
Both Xalan and XT will turn it into
<init-param>
<style>abc</style>
</init-param>
the identity transformation code I am using:
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template
match="text()|@*|comment()|*|processing-instruction()">
<xsl:copy>
<xsl:apply-templates
select="text()|@*|comment()|*|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list