Define a key
for the property we want
to use for grouping.
Select all of the nodes . . .
For each unique grouping value, . . .
Define an XPath expression . . .
Select all of the nodes we want to group . . .
Instead of dealing with each . . .