Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Counting nodes using xsl:key

 
V Chauhan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • 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
 
Clifton Craig
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • 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.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic