Subject:Grouping/Counting Problem Author:Stu Plum Date:25 Oct 2006 07:27 AM
Hi Guys,
I think this one is an easy one to fix, but I can't get my head around it so any help would be greatly appreciated.
From the sample xml below I want to count the items that have a matching itematt attribute. But at the same time I don't want to have to specifiy the itematt as a predicate, as these are generated dynamically.
For example the results I would expect to see (not formatted) from the sample xml would be:
AAA : 3
BBB : 1
CCC : 3
DDD : 3
empty : 12
This produces a list of unique @itematt's, but the count for each one only displays '1', I don't know how to count() each itematt from within the for-each loop. any more pointers??