[xsl] Creating a CDATA tag in output XML

Subject: [xsl] Creating a CDATA tag in output XML
From: "Yashdeep Patil" <yashdeep@xxxxxxxxxxx>
Date: Thu, 8 Apr 2004 16:09:24 +0530
Thanks Jarno and Michael for your answers to my earlier problem on retaining
markup in the output XML. I have solved the problem with
disable-output-escaping. I know the structure should not have contained the
markup in CDATA, but the structure in generic in nature, and cannot be
changed for this instance.
I have another problem where I need to output a CDATA tag in a resultant XML

My input XML looks like:
<a><b>123</b></a>

and my XSL snippet looks like :
<xsl:element name="x">
    <xsl:copy-of select="."/>
 </xsl:element>

Now I would like my resultant XML output to look like:
<x >
    <![CDATA[<a><b>123</b></a>]]>
</x>

Is this possible using XSL.
Thanks
Yashdeep Patil.

Current Thread