This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CDATA question


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>
        &lt;style&gt;abc&lt;/style&gt;
    </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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]