[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: possible? for-each-group inside a for-each-group

Subject: RE: possible? for-each-group inside a for-each-group
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 2 Mar 2005 15:10:12 -0000
xsl for each nest
> I am trying a for-each-group inside another one, is this 
> possible, or do I have to do this in two following transformations??

Yes. it's absolutely possible. You can nest for-each-group statically, or
dynamically, or both. I often nest it recursively.
> 
> I tried following stylesheet. Thought about adding a 
> current-group() inside the group-ending-with statement, 
> didn't work either.
> 
> <tatbestand>
> 	<xsl:for-each-group 
> select="par[@class='Entsch_normal'][not(inline[@class='*Gesetz
> esstelle'])]" 
> group-starting-with="par[@class='Entsch_normal'][inline[@class
> ='*fett']]">

Since every item in the population is a par element with
@class='Entsch_normal', including this in your starting-with condition is
rather redundant.
> 	
> 		<xsl:for-each-group select="*" 
> group-ending-with="par[@class='Entsch_normal'][inline[@class='
> *fett']]">

Normally the inner grouping will select all the items in the outer group.
select="*" selects the children of the context item, which is the first item
in the current group. The most common usage is to use
select="current-group()" in the inner grouping. Perhaps you want
select="current-group()/* - but I'm not sure, I don't understand your
requirements well enough.

Michael Kay
http://www.saxonica.com/

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.