Counting unique XML element attributes using XSLT

Tronangerve

New Member
I've just started using XSLT and am trying to figure this out.Your help would be greatly appreciated.Example XML file\[code\]<purchases> <item id = "1" customer_id = "5"> </item> <item id = "2" customer_id = "5"> </item> <item id = "7" customer_id = "4"> </item></purchases>\[/code\]Desired HTML Output:\[code\]<table> <tr><th>Customer ID</th><th>Number of Items Purchased</th></tr> <tr><td>5</td><td>2</td></tr> <tr><td>4</td><td>1</td></tr></table>\[/code\]Customer with id number 5 has bought 2 items.Customer with id number 4 has bought 1 item.
 
Back
Top