In XSLT 2.0
Code:
<xsl:for-each select="1 to $N">
<br/>
</xsl:for-each>
In XSLT 1.0 the usual workaround, which assumes there are at least N nodes in your input document, is
Code:
<xsl:for-each select="//node()[position() <= $N]">
<br/>
</xsl:for-each>
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Last edited by mhkay; February 2nd, 2011 at 07:33 PM..
Reason: code typo
|