Hi all,
CDATA is not part of the input tree that is passed to the xslt processor
and understood that to keep CDATA in certain elements use:
<xsl:output cdata-section-elements="element"/>
<xsl:template match="element">
<xsl:copy>
<xsl:text
disable-output-escaping="yes"><![CDATA[</xsl:text><xsl:value-of
select="text()" disable-output-escaping="yes" /><xsl:text
disable-output-escaping="yes">]]></xsl:text>
</xsl:copy>
</xsl:template>
But what about keeping the DTD declaration along with Entity in resulting
output (required for roundtriping).
<!DOCTYPE chapter PUBLIC "-//ABC//DTD version 1.1.1//XML" "book111.dtd"
[<!ENTITY fx1 SYSTEM "fx1" NDATA IMAGE><!ENTITY gr1 SYSTEM "gr1" NDATA
IMAGE>]>
I remember attempting this way back with "doctype-public" /(Karen Lease's
example at XML Europe) but with no good results. Anybody got a luck for
that or better way to get this done in XSLT. Currently I am ending up
using Java (TransformerFactory, DOMSource etc) after transformation to get
this done.
Any thoughts will be appreciated.
Best,
Pankaj
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--