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

grouping content

Subject: grouping content
From: Gavin Myers <GavinM@xxxxxxxxx>
Date: Thu, 5 Apr 2001 15:55:57 -0500
gavin myers
hello

having a slight problem 

lets say the xml looks like this:
<Location Area="A" Value="23">
<Location Area="A" Value="24">
<Location Area="A" Value="45">
<Location Area="A" Value="88">
<Location Area="B" Value="38">
<Location Area="B" Value="18">
<Location Area="C" Value="241">
<Location Area="C" Value="213">

and I want to pull out values like this:

Location A
23
24
45
88

Location B
38
18

Location C
241
213

In xsl I was thinking of doing this:
<xsl:choose>
	<xsl:when test="@Location=$Location">
	</xsl:when>
	<xsl:otherwise>
	<xsl:param name="Location" select="@Location"/>
	<br/>Location <xsl:value-of select="$Location"/>
	</xsl:otherwise>
</xsl:choose>
<br/><xs:value-of select="@Value"/>

For some reason it will go straight to the otherwise and not even look at
the 
test. So I get this:

Location A
23
Location A
24
Location A
45
Location A
88
Location B
38
...
and so on

Does anyone know of a good way to resolve this?

I would greatly appreciate it if you could cc my e-mail address on any reply

(gavinm@xxxxxxxxx)

Thanks!

Gavin

 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.