[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

Subject: Re: applying one template to next chunk of child nodes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 13 Jan 2006 15:09:33 GMT
xslt2 chunk
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() &lt; 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.