RE: [xsl] How to disable escaping of '<' characters

Subject: RE: [xsl] How to disable escaping of '<' characters
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sun, 11 Mar 2001 18:42:52 -0000
> I want to disable the escaping of '<' ,'>' characters in XML.

Well you can, by writing xsl-value-of disable-output-escaping="yes".

But you only think you want to. What you really want to do is to get your
data structure right. If you store "<" characters in text nodes and expect
them to behave as markup, then you are in for a rough ride. If you want to
add a <font> element to your DOM, then add a <font> element, not a piece of
text that's got angle brackets in it.

Mike Kay
Software AG
>             child.appendChild(doc.createCDATASection("<font
> size='2'>XML</font>"));


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread