This is my xml
<hotel>
<rooms>
<room>
<rates>
<rates id="1" adult="1" child="0"><rates>
<rates id="2" adult="2" child="0"><rates>
<rates id="3" adult="1" child="0"><rates>
</rates>
</room>
<room>
<rates>
<rates id="4" adult="1" child="0"><rates>
<rates id="5" adult="2" child="0"><rates>
<rates id="6" adult="2" child="0"><rates>
</rates>
</room>
</rooms>
</hotel>
How to make group by based on "Adults" and "Child" using xslt 1.0
same adult and child in one rates node and the way of grouping
result i need like below,
<hotel>
<rooms>
<room>
<rates>
<rates id="1" adult="1" child="0"><rates>
<rates id="3" adult="1" child="0"><rates>
<rates id="4" adult="1" child="0"><rates>
</rates>
</room>
<room>
<rates>
<rates id="2" adult="2" child="0"><rates>
<rates id="5" adult="2" child="0"><rates>
<rates id="6" adult="2" child="0"><rates>
</rates>
</room>
</rooms>
</hotel>