XSL Ternary Logic

Can someone explain to me why this is not allowed and suggest an alternative. I understand that I could use the xpath if. However, I have to stick to XPath 1.0 for this.

Thanks


		<xsl:choose>
			<xsl:when test="$found_rows < $limit">
				<xsl:variable name="pages" select="1"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="pages" select="ceiling($found_rows div $limit)"/>
			</xsl:otherwise>
		</xsl:choose>

Wow that was quick. Apparently the solution is outlined on the w3c schools xsl:choose page at the very bottom.


		<xsl:variable name="pages">
  			<xsl:choose>
    			<xsl:when test="$found_rows < $limit">
     				 <xsl:value-of select="1"/>
    			</xsl:when>
   	 			<xsl:otherwise>
   	 				<xsl:value-of select="ceiling($found_rows div $limit)"/>
   	 			</xsl:otherwise>
  			</xsl:choose>
		</xsl:variable>