In XSLT 2.0
<xsl:for-each select="1 to $N">
In XSLT 1.0 the usual workaround, which assumes there are at least N nodes in your input document, is
<xsl:for-each select="//node()[position() <= $N]">
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