xsl-list
[Top] [All Lists]

Re: for-eaching for specified number of times

2004-01-21 13:37:12

Is there a way of terminating a for-each loop after it has reached a
specified number of iterations.


As illustrated by the other postings, this implies you only want to process
a subset of the nodes selected by your expression in the for-each statement,
such as with

<xsl:variable name="limit" select="'100'"/>

<xsl:for-each select="foo[position() &lt; $limit]">
</xsl:for-each>

If this is not what you are trying to do, perhaps you should tell us what
you are trying to accomplish with your for-each loop.

...sam



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list