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,988
  • 36
  • 94
  • 131

2 Answers2

52

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

Julien Oster
  • 2,256
  • 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
  • 31,389
  • 11
  • 53
  • 57
  • 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