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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xsl if test using < operator not working

Status
Not open for further replies.

divinyl

IS-IT--Management
Nov 2, 2001
163
GB
Hi all,

I can't get my ahead around this. I've got an XSLT transformation file which needs to check the value of a variable and based on whether it is greater or less than 0, format the result in a specific way.

So very simply:

<code>

<xsl:if test="$variable > '0'">
<td bgcolor="RED">Result1</td>
</xsl:if>


</code>

That works. However, if i change the comparison operator from > to < then the transformation files. Checking the file in XML Spy, it says the document is not well formed! If i change the operator to an = sign, it also works. So it's only the < less than operator that doesn't seem to work. Why??? Can anyone help?

Thanks

Divinyl

 
You need to use &gt; or &lt;

Jon

"There are 10 types of people in the world... those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top