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

Meunchian Method - Grouping with attributes

Subject: Meunchian Method - Grouping with attributes
From: "Magick, Brian" <Brian.Magick@xxxxxxxxxx>
Date: Fri, 25 Jan 2002 15:56:01 -0600
meunchian method
I'm having a tough time grouping on an attribute where I need to get
only unique values of the domain attribute for each unique technology.
The problem is that the technology element is unbounded and repeats as a
child of the unbounded product element.  Looking at the XML below we see
that tech 1 belongs to both Product 1 and Product 2 and has a domain
attribute of xyz and abc.  Whenever I group and output the values to get
each unique domain I always get repeating domain values.  So grouping on
Tech 1 I would get 2 values for domain=xyz and 2 values for domain=abc
(since the domain has these values in both Product 1 and Product 2).

I've been trying to set the key as <xsl:key name="domain4tech"
match="technology/@domain" use="technology"/> but this has proved
useless.  Any suggestions?

Here's an example of the output I'm looking for.

Technology 1
	domain = xyz
	domain = abc

Technology 2
	domain = xyz
	domain = abc
	domain = zzz
	domain = xxx

Technology 3
	domain = xyz
	domain = aaa

-------------------------------
Here's the XML

<document>
   <products>
 	<product>Product1
	   <technology domain="xyz">tech1</technology>
	   <technology domain="abc">tech1</technology>
	   <technology domain="xyz">tech2</technology>
	   <technology domain="xxx">tech2</technology>
         <technology domain="xyz">tech3</technology>
      <product>
	<product>Product2
	   <technology domain="xyz">tech1</technology>
	   <technology domain="abc">tech1</technology>
	   <technology domain="zzz">tech2</technology>
	   <technology domain="xxx">tech2</technology>
         <technology domain="aaa">tech3</technology>
      <product>
    <products>
<document>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.