24

Each of these variables has an integer value. But this syntax is not valid for some reason:

<xsl:when test="$nextAnswerListItemPos < $nextQuestionStemPos" >
joe
  • 16,258
  • 36
  • 92
  • 130

2 Answers2

51

You have to use &lt; instead of < and &gt; instead of >, because those are reserved characters.

Julien Oster
  • 2,226
  • 16
  • 19
9

Also, in XSLT 2.0, you can use the operators "gt" (greater than), "lt" (less than), and "eq" (equal). Using these instead of the entities makes your code a bit cleaner.

James Sulak
  • 29,817
  • 11
  • 50
  • 56
  • Please note that .net only supports XSLT 1.0 http://stackoverflow.com/questions/1525299/xpath-and-xslt-2-0-for-net you need saxon for 2.0 – JP Hellemons Sep 15 '15 at 10:32