Hi,
I have an xml like this
<agency count="133">GOV.NIH.XYZ.465.56</agency>
<agency count="129">GOV.NIH.ABC.245.21</agency>
<agency count="216">GOV.NIH.NCI.456.23</agency>
<agency count="48">GOV.USDA.4412.345.08</agency>
<agency count="46">GOV.USDA.1411.345.00</agency>
<agency count="51">GOV.USDA.5512.231.05</agency>
<agency count="42">GOV.USDA.1411.16.10</agency>
<agency count="39">GOV.USDA.5512.16.12</agency>
<agency count="32">GOV.USDA.1411.17.03</agency>
<agency count="60">GOV.FDA.4412.33.56</agency>
<agency count="59">GOV.FDA.4410.45.87</agency>
<agency count="55">GOV.FDA.1411.56.213</agency>
<agency count="60">GOV.FDA.1412.86.45</agency>
<agency count="55">GOV.FDA.1431.32.45</agency>
I need to sort them based on the coutn for each agency .
The results would like something like this
Top 3 agencies
GOV.NIH (478)
GOV.NIH.NCI.456(216)
GOV.NIH.XYZ.465(133)
GOV.NIH.ABC.245(129)
GOV.FDA(289)
GOV.FDA.1412.86(60)
GOV.FDA.4412.33(60)
GOV.FDA.4410.45(59)
GOV.USDA(238)
GOV.USDA.5512.231(51)
GOV.USDA.4412.345(48)
GOV.USDA.1411.345(46)
I don't have the luxury of using XSLT2.0 grouping.
Can someone please tell me how can I achieve this in XSLT1.0?
Thank you.
Saraswathy.