Re: [xslt] handling of < in CDATA sections



On 2005-02-22 10:39:39 +0100, Roel Vanhout wrote:
> 1.) Is this behaviour ok? Should a < in a CDATA section be escaped to &lt;?

Writing < in a CDATA section is not different from writing &lt; outside.
In both cases, you have a character < that belongs to a text node. I've
not seen the stylesheet, but IMHO, libxslt is doing the right thing, by
escaping < when generating a text node.

> 2.) What other options do I have to reach my goal? I've tried <xsl:text> 
> but that (as I expected) didn't help.

The cleanest way in your case is to use xsl:processing-instruction to
create a PI.

> The bug report with the original stylesheet and the message that it
> didn't work can be found in the gnome bugzilla, see
> http://bugzilla.gnome.org/show_bug.cgi?id=168030. Thanks for any
> help in this.

It should be closed as invalid.

-- 
Vincent Lefèvre <vincent vinc17 org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]