[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Apply for-each-group to a node subset
Tony Graham wrote: > It may be simpler if you do it all using ">>": > > <xsl:template match="r"> > <xsl:copy> > <xsl:apply-templates select="*[../g1[1] >> .]"/> > <xsl:for-each-group > select="g1[1] | > *[(. >> ../g1[1]) and (../g2[last()] >> .)] | > g2[last()]" > group-ending-with="g2"> > <group> > <xsl:apply-templates select="current-group()"/> > </group> > </xsl:for-each-group> > <xsl:apply-templates select="*[. >> ../g2[last()]]"/> > </xsl:copy> > </xsl:template> Aha! Very nice. Your other email also presented a very easy to understand solution. Thanks to both Tony and Abel. Cheers, Raman
|
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
|