Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XSLT 1.0 -- grouping items from a list of items of variable length [Thread Next] Re: XSLT 1.0 -- grouping items from a list of items of variable leTo: NULL Date: 12/1/2006 1:50:00 PM > Fundementally you need two loops. an outer loop to select the first image > and every sixth image after that. And an inner loop to select that image and > the 5 following sibilings. > > Hence:- > > <xsl:for-each select="item[position() mod 6 = 1]"> > <xsl:for-each select=". | following-sibling::item[position() < 6]"> > <img ...whatever /> > </xsl:for-each> > <p ...throw page.. /> > </xsl:for-each> > > Thanks for the suggestion. Hadn't thought of leveraging using the following-sibling axis. Does the trick perfectly. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
