[xsl] Re: for-eaching for specified number of times

Subject: [xsl] Re: for-eaching for specified number of times
From: "Sam Byland" <shbyland@xxxxxxxxxxx>
Date: Wed, 21 Jan 2004 15:37:12 -0500
>
> 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


Current Thread