Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CDatasection with XSL

Status
Not open for further replies.

Kai77

Programmer
Jun 7, 2004
77
NL
I used a cdata section to keep HTML tags intact. But when I parse it using my XSL, it displays escaped characters (<font face="Times New Roman">KOLOM 1: <b>nada </b><br> <br> "). I specifically used the cdata section to prevent this from happening.

My XML:
<xml>
<column><![CDATA[<font face="Times New Roman">KOLOM 1: <b>nada </b><br> <br> ]]></column>
</xml>


XSL:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl=" version="1.0"
xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
<xsl:eek:utput method="xml" indent="yes"/>
<xsl:template match="/xml">

<xsl:for-each select='/xml/column'>
<xsl:element name="column">
<xsl:element name="content">
<xsl:attribute name="type">text</xsl:attribute>
<xsl:value-of select= "."/>
</xsl:element>
</xsl:element>

</xsl:for-each>

</xsl:template>
</xsl:stylesheet>
 
THis is the reason

<xsl:value-of select= "." disable-output-escaping="yes"/>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top