• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Counting nodes using xsl:key

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I have the following xml data.


I need to generate the count of teachers and doctors for each state i.e., the output xml should look like the following.



I wrote a xslt file to group the number of nodes based on location.



However I am not able to add another level of grouping to this xslt to group nodes based on profession (in addition to location). Something like using two group by clauses in a sql query. Any ideas or suggestions?

Thanks in advance,
Basu
 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried something like this? (completely off my head and untested and not garunteed...)


That's just a guess at something you could try.
(All code samples are provided as is and should be used as directed. Do not use if you are pregnant or expect to become pregnant. Certain usage may run the risk of baldness and/or blindness. Consult your tech manual if you experience pain or swelling as this may a symptom of a serious related illness.)
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic