I want to calculate the modulus of a number in the XPath, but this is not working:
<xsl:if test="(count()%8)">
How would I do it? I Looked at the XPath function reference here, but didn't see anything like that.
try "mod"
see http://www.w3.org/TR/xpath#numbers
Details from that link:
The mod operator returns the remainder from a truncating division. For example,
5 mod 2 returns 1
5 mod -2 returns 1
-5 mod 2 returns -1
-5 mod -2 returns -1
NOTE: This is the same as the % operator in Java and ECMAScript.