Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Getting nested-group item counts

From: Chris Gannon <chris@-----------.--->
To: NULL
Date: 8/7/2009 1:11:00 PM
I've got some xslt that's performing nested grouping and everything is
almost right with the world.

I'm grouping first on Location, then on Category.

What I would like to do is display the item count next to each
Category for that Location but I keep getting the total count of all
items with the same Category name...

What I'd like to see is...
  Location: East  Category: Meetings [4]
   East meeting item 1
   East meeting item 2
   East meeting item 3
   East meeting item 4

  Location: West Category: Meetings [2]
   West meeting item 1
   West meeting item 2

What I'm getting is
  Location: East  Category: Meetings [6]
   East meeting item 1
   East meeting item 2
   East meeting item 3
   East meeting item 4

  Location: West Category: Meetings [6]
   West meeting item 1
   West meeting item 2

This is what my data structure is like...
<?xml version="1.0" encoding="utf-8"?>
<dsQueryResponse>
<Rows>
<Row Category="Meetings" Location="East" _x0023_="1" Item="East
meeting item 1" />
<Row Category="Meetings" Location="East" _x0023_="2" Item="East
meeting item 2" />
<Row Category="Meetings" Location="East" _x0023_="3" Item="East
meeting item 3" />
<Row Category="Meetings" Location="East" _x0023_="4" Item="East
meeting item 4" />
<Row Category="Presentations" Location="East" _x0023_="1" Item="East
Presentations item 1"  />
<Row Category="Presentations" Location="East" _x0023_="2" Item="East
Presentations item 2" />
<Row Category="Projects" Location="East" _x0023_="1" Item="East
Projects item 1" />
<Row Category="Meetings" Location="West" _x0023_="1" Item="West
meeting item 1" />
<Row Category="Meetings" Location="West" _x0023_="2" Item="West
meeting item 2"  />
<Row Category="Presentations" Location="West" _x0023_="1" Item="West
Presentations item 1" />
<Row Category="Projects" Location="West" _x0023_="1" Item="West
Projects item 1" />
<Row Category="Projects" Location="West" _x0023_="2" Item="West
Projects item 2" />
</Rows>
</dsQueryResponse>


Any ideas on what I can do here?


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent