This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: for-each
- To: xsl-list at mulberrytech dot com
- Subject: Re: for-each
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Wed, 12 Jul 2000 11:17:12 GMT
- References: <15700E247201D411951C00508B95B01B4E63F0@EXCHANGE>
- Reply-To: xsl-list at mulberrytech dot com
> How can we find, let say, the fourth elements of the for-each loop?
<xsl:if test="position() mod 4 = 0">
but if what you want to do is group the elements into 4's then you don't
want to do this, instead you want to just loop through every fourth
element in the original list, ie change the select expression in the
for-each. See the FAQ section on grouping. (http://www.dpawson.co.uk jas
the FAQ)
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list