这是我的XSLT:
<xsl:variable name="adlength" select="35"/>
<xsl:for-each select="/*/locations/location">
<xsl:variable name="currentadlength" select="position()"/>
<xsl:if test="$currentadlength < $adlength">
</xsl:if>
</xsl:for-each>
我的问题在于这行代码:
<xsl:if test="$currentadlength < $adlength">
如果if
小于currentadlength
adlength
阶段
答案 0 :(得分:0)
为什么不简单
<xsl:for-each select="/*/locations/location[position() < 35]">
<!-- ... -->
</xsl:for-each>