Use the teradata_group attribute in the stylesheet to annotate the result structure with information regarding which fields comprise repeating groups, specifying the key fields on which grouping will be done. To specify the grouping behavior, place a teradata_group attribute under which the grouping will happen and assign it a value on which the grouping will be done at that level.
In the previous Purchase Order example, the fields that comprise repeating groups are represented by the Customer, Order, and Item elements.