1 users online. Create an account or sign in to join them.Users

Search

How can I wrap formatted HTML inside a CDATA-tag?

If I understand you correctly, I just dealt with the same issue to match a legacy system’s output. This worked for me:

<xsl:template match="flash-about/entry/body">
    <body>
        <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
        <xsl:value-of select="." disable-output-escaping="yes" />
        <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
    </body>
</xsl:template>

Thanx! This worked just fine!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details