Re: for-each

Subject: Re: for-each
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 12 Jul 2000 11:17:12 GMT
> 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


Current Thread
  • for-each
    • Jo Kong HO - Wed, 12 Jul 2000 10:57:49 +0100
      • David Carlisle - Wed, 12 Jul 2000 11:17:12 GMT <=