Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange IF TEST behaviour for Less than or equal to XSL

Status
Not open for further replies.

Lammers

Programmer
Sep 5, 2001
12
0
0
HK
Strange if i have the following in an xsl file:
<xsl:if test= &quot;500 >= @numbID&quot;>
...
</xsl:if>

it works!

BUT reverse it:
<xsl:if test= &quot;@numbID <= 500&quot;>
...
</xsl:if>

the XML transformation fails!

Go figure.
 
The parser has trouble with the '<' and '>' operands, because they are also used by xml tags. To avoid any problems use html character codes when representing them.

codes:
Code:
'<' = & lt; 
'>' = & gt;
The space between the & and the l/g doesn't belong there, but else the code is converted by the browser in < and >

Jordi Reineman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top