I have this XML file, from which I\'d like to count the number of users referenced in it. But they can appear in more than one category, and I\'d like these duplicates not t
count(//user[not(./@name = preceding::user/@name)])
I think the best way is to try to draw your xml data on paper to see how you can solve it easily