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

Grouping upon various attribute values

Subject: Grouping upon various attribute values
From: <lawrence.michel@xxxxxxx>
Date: Wed, 16 Aug 2006 15:25:31 +0200
 Grouping upon various attribute values
Hi all,

I have a little problem, which gives me a bit headache at the moment.
Maybe you could help me solve it :

Here the given XML :

		<produktenZumAnalysieren>
			<gesamtMenge>
				<filter aufAttribut="Name_Stat"
typ="diskret" wertStruktur="baum" wert="BP"/>
				<filter aufAttribut="FrankaturArt"
typ="diskret" wertStruktur="genau" wert="PP"/>
			</gesamtMenge>
		</produktenZumAnalysieren>
		<produktenZumAnalysieren>
			<gesamtMenge>
				<filter aufAttribut="Name_Stat"
typ="diskret" wertStruktur="baum" wert="BP"/>
				<filter aufAttribut="FrankaturArt"
typ="diskret" wertStruktur="genau" wert="PP"/>
			</gesamtMenge>
		</produktenZumAnalysieren>
		<produktenZumAnalysieren>
			<gesamtMenge>
				<filter aufAttribut="Name_Stat"
typ="diskret" wertStruktur="baum" wert="BP"/>
				<filter aufAttribut="Gewicht"
typ="interval" wert_Ab="1" wert_Bis="100"/>  //<- Careful here, there is
a new set of attributes
			</gesamtMenge>
	</produktenZumAnalysieren>

As you can see, there are three "gesamtMenge" elements, each in its own
"ProduktZumAnalysieren" element.

Now, I would like to apply a for-each-group loop on them :

	<xsl:for-each-group select="produktenZumAnalysieren"
group-by="gesamtMenge/filter/@* (KICKME HERE)">

That is, the grouping key isn't doing what I expect: I need to have all
attributes taken in consideration for grouping the required elements. In
this example, I should have two distinctive groups

Any help would be really greatfull ;-)

Cheers

Lawrence Michel, Bern, Switzerland

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.