Page 1 of 1

Output in XSLT

Posted: Fri Aug 25, 2006 10:07 pm
by GameMusic
I'm trying to do templates with XML & XSLT. However some of the data is HTML or Javascript and not plain text. For example the comments element in the XML may contain code.

Code: Select all

<comments><![CDATA[<b>Comments</b>]]></comments>
Displays as <b>Comments</b>, not Comments.

On Google I found the xsl:copy-of technique, which does the job if I don't use CDATA; however the HTML in the comments could easily contain code that would not be XML compatible, so I need to be able mass quote it in the XML without having the comments quoted when they're displayed.

Basically I need to be able to output HTML or Javascript data without having it interpreted by the XML interpreter.

Posted: Fri Aug 25, 2006 11:51 pm
by feyd

Posted: Mon Aug 28, 2006 2:01 pm
by Ollie Saunders

Code: Select all

<comments><b><![CDATA[Comments]]></b></comments>