指定數目這裏是我的XSLT:限制XSL的執行:模板的時間
<!-- Looping through both Items and Categories of Items -->
<xsl:for-each select="statement">
<!-- Define whether current node is a single item or a category of items -->
<xsl:choose>
<!-- Category of items -->
<xsl:when test="statement">
<!-- Render all items in this category -->
<xsl:for-each select="statement">
<xsl:call-template name="renderItem" select="current()" />
</xsl:for-each>
</xsl:when>
<!-- Single item -->
<xsl:otherwise>
<xsl:call-template name="renderItem" select="." />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
我希望能夠將項目的輸出具體的數字,但不是所有的人。 我該如何讓「renderItem」執行不超過4次?
Pablo,感謝您發佈此解決方案。我會試一試。 – 2013-02-19 02:52:01