For the below xml i want to render the unescaped text parts on browser from xslt e.g.:
<one>
<text>
</one>
I want the markup rendered on browser to be:
<text>
But when I use the apply templates which looks like below
<xsl:template match="text()" mode="literalHTML">
<xsl:copy-of select=".">
</xsl:copy-of>
</xsl:template>
The above XML is getting rendered as:
<text>
How can I modify this template so that it prints <text> on browser?
Best Regards,
Keshav
This can be achieved in XSLT 1.0 using quite tricky recursive processing.
Fortunately, one can use FXSL ( a library of XSLT templates) to solve the same task in just a few minutes:
when this transformation is applied on the following XML document:
the wanted result is produced:
and it displays in the browser as:
<text>