This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How to tranform the xml
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: How to tranform the xml
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Fri, 10 Nov 2000 12:55:19 -0000
- Reply-To: xsl-list at mulberrytech dot com
> But have no idea how to wrap a node by another.
>
> I want it to be transformed to :
>
> <?xml version="1.0" encoding="utf-8"?>
> <node1 role="MAIN">
> <node2 mediatype="text" >
> <text><![CDATA[ <p> xyz</p>
> <p> ab.</p>]]>
> </text>
> </node2>
> </node1>
>
>
I would love to know why you want to do this, because it seems so strange to
use XML markup in a structure, and then pretend it isn't XML markup by
enclosing it in CDATA.
Because you are doing something pretty odd here in terms of pretending that
your XML is just ordinary text, I would use disable-output-escaping:
<xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text>
<xsl:copy-of select="."/>
<xsl:text disable-output-escaping="yes">]]></xsl:text>
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list