Using c#3 compiled transforms the following seems to work just fine…
<xsl:choose>
<xsl:when test="$valA > $valB">
<xsl:value-of select="$maxUnder" />
</xsl:when>
<xsl:when test="$valA < $valC">
<xsl:value-of select="$maxOver" />
</xsl:when>
</xsl:choose>
However if i dare use a < in place of < it gives an error…
<xsl:choose>
<xsl:when test="$valA > $valB">
<xsl:value-of select="$maxUnder" />
</xsl:when>
<xsl:when test="$valA < $valC">
<xsl:value-of select="$maxOver" />
</xsl:when>
</xsl:choose>
System.Xml.XmlException: ‘<‘,
hexadecimal value 0x3C, is an invalid
attribute character.
So why is > ok and not < ?
Because
>isn’t a reserved character in XML, but<is.From section 2.4 of the XML 1.0 spec (5th edition):