|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: applying one template to next chunk of child nodes
google for for "xslt grouping" but <xsl:for-each select="Item[position() mod 10 = 1]"> Group: <xsl:value-of select="position()"/> <xsl:apply-templates select=".|following-sibling::Item[position() < 10]"/> </xsl:for-each> will get you started in xslt1, or if you are using xslt2, then there is a new xsl:for-each-group instruction that makes this even easier. David PS > Is there a posibility to call a template for the first 10 Item-Tags, I assume you mean node (as in your subject line) rather than tag here (the first 10 tags represent the first 5 elements) 90% of XML users seem to use "tag" as a synonym for element, but some of us still stick to the original meaning... ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








