Pascal,

Other XSLT parsers don't have this same problem - with the '<' becoming &lt;
in CDATA sections (such as XT)

However, I understand that this is to be fixed in future versions.

A work around is to wrap the CDATA sections in
<xsl:text>
</xsl:text>
tags.  (although it didn't seem to work when I was using it - but it is the
official work around)

Outside of CDATA sections, the &lt; should be used instead of '<' to work in
such syntax as
<xls:if test="position() &lt; 10"> rather than <xls:if test="position()<10">

I'll quote from a simular discussion from the xml mailing list through
http://www.mulberrytech.com/xsl/xsl-list

> if you
> need to enter a < you have to quote it, so to put that XPath expression
> in an attribute you need <xsl:if test="3 &lt; 5"> This is nothing to do
> with Xpath or XSLT, it is just a basic rule of XML. The same rule does
> not apply to > so you can go <xsl:if test="3 &gt; 5">  or  <xsl:if test="3
> 5">

Hope that this helps, and hopefull Sablatron will allow '<' in CDATA soon

Tim Watts

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 17 April 2001 5:11 PM
To: Sablotron Mailing List
Subject: [Sab] Re: [Sab] whitespace

> > I noticed that sablot is sensitive to "<" sign in CDATA sections
and  even between quotes in test attribute of an xsl:if.

i mean "<" is replaced by &lt ; in these cases.

eg :
<xls:if test="position()<10"> issues an error
...
</xsl:if>

and
[!CDATA[<!-- @import ...-->]] outputs  : &lt;-- @import ...--> after

transformation

and of course [!CDATA[&lt;!-- @import ...-->]] is not understood by
the browser after output.

i thought this automatic replacement was not to happen  in CDATA
sections ; but maybe is normal in attributes value (between quotes)
and must be

pascal



Reply via email to