RE: Using CDATA but still "<" is inserted ???

Subject: RE: Using CDATA but still "<" is inserted ???
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 1 Oct 1999 10:27:01 +0100
> I can't figure out why 
> 	<![CDATA[1234 <A href="http://1234";>http://1234</A> 1234]]>
> Produces this:
> 	1234 &lt;A href="http://1234";>http://1234&lt;/A> 1234
> I want it to produce this:
> 	1234 <A href="http://1234";>http://1234</A> 1234
> 
> I'm using the Lotus xsl processor 0.18.2
>

This is probably the most-FAQ! Whether your input uses CDATA or entity
references or character references is irrelevant, a "<" supplied in
character content cannot be used to generate markup in the output document.
If you want to generate an <A> element, use a literal result element <A> in
the stylesheet, or <xsl:element>.

The latest spec does provide a way of cheating, using
disable-output-escaping, but (a) I don't know if Lotus implements it, and
(b) I can't see any reason why you would need it here.

Mike Kay


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


Current Thread