Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grouping and counting of data using xslt

Status
Not open for further replies.

jermine

Programmer
Jun 15, 2001
59
SG
Im new with xml stuff, and i was hoping some of the gurus here can put me in the right direction. I tried the key generate-id thing but cant seem to make it work.

here's my problem :
I want to display the following data in a tabular format and count the data based on their grouping.


My data :
Code:
 <data>
  <feesOwed>
    <Year>2005</Year>
    <LastName>Hallett</LastName>
    <Chapter>NY</Chapter>
    <Amount>25</Amount>
  </feesOwed>
  <feesOwed>
    <Year>2005</Year>
    <LastName>Vincent</LastName>
     <Chapter>TX</Chapter>
    <Amount>25</Amount>
  </feesOwed>
  <feesOwed>
    <Year>2005</Year>
    <LastName>Macoleni</LastName>
      <Chapter>NY</Chapter>
    <Amount>40</Amount>
  </feesOwed>
  <feesOwed>
    <Year>2004</Year>
    <LastName>Strauss</LastName>
      <Chapter>PA</Chapter>
    <Amount>10</Amount>
  </feesOwed>
 </data>

Desired output is :

Year Chapter LastName Amount
2004 PA Strauss 10
2005 NY Vincent 25
(space) (space) Hallett 25
(space) (space) Macoleni 40


AND having totals between each chapter and year.
Is this possible? or am i reaching for the stars already?

thanks in advance!
-jermine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top