This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: for-each



> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]