[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: Less than symbol in xsl:if or xsl:when
From: Lars Huttar <lars_huttar@xxxxxxx>
Date: Thu, 07 Oct 2010 16:04:43 -0500
 On 10/7/2010 2:42 PM, sudheshna iyer wrote:
> <xsl:when test="string-length($VAR1) < $VAR3">  => Doesn't work
>
> How do I achieve this?

Because of XML markup rules, you cannot use < directly in an attribute
value.
Instead of < you must use the character entity &lt; :

<xsl:when test="string-length($VAR1) &lt; $VAR3">

Lars

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member