XSLT中如何进行算术运算?
Aon 2003-10-16 09:10:06 我有一个页面,想进行翻页,需要将 PageNumber 加一或减一,在XSLT中有加、减、乘、除吗?
我的代码如下:
<xsl:choose>
<xsl:when test="response/otherinfo[pagenumber $lt$ pagecount]">
<a>
<xsl:attribute name="href">
userinfo.asp?id=<xsl:value-of select="id"/> &pagenumber=<xsl:value-of select="response/otherinfo[pagenumber+1]"/>
</xsl:attribute>
下一页
</a>
</xsl:when>
<xsl:otherwise>
<a href="#">
<span style="font-size:11px;color:#FF3333">下一页</span>
</a>
</xsl:otherwise>
</xsl:choose>
这样写不行,错误为“预期] ,遇到+”
后来我用脚本完成了,但很想知道,有没有算术运算符可以执行这样简单的运算?
我在XMLSDK3.0的XSL文档中发现有加、减、乘、除的运算符,但没有例子,我不知道具体应该如何写。