[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] applying one template to next chunk of child nodes
Subject: Re: [xsl] applying one template to next chunk of child nodes From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 13 Jan 2006 15:09:33 GMT |
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 ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] applying one template to next, Alexander Stippler | Thread | [xsl] Formatting XML output, Rick Quatro |
RE: [xsl] XPath expression confusio, Xia Li | Date | RE: RE: RE: [xsl] html tables with , Deepak |
Month |
Keywords