XSL if test syntax
Posted on 2003-03-27
I want to test whether the value of my ID attribute is negative. When it's negative, I want to output an 'm', otherwise output nothing.
Example of the xml:
<item ID="-1" /><item ID="3" />
At the moment the XSL I have includes:
<xsl:if test="@ID[ .$lt$ 0]">m</xsl:if>
At the moment the test is always failing, even when the ID is negative.
I'm not using the current w3 recommendation for xsl, but rather the working draft.
thanks for any light you can shed on this.