I find XSLT 1.0 Meunchian grouping very complex. If you can guide me on the following using xsl:key, that would be great. The actual XML is huge, and I've only used a partial portion of it to indicate the structure.
If you need any additional clarification please let me know.
My requirement is to have the following sample XML displayed in a tabular format, grouped first by the itemtype name and then by customer name. Please note that the node Details has always only one node Detail
Desired Output
ItemType Customer Name Price
Book John Smith 7
DVD John Smith 45
DVD Jane Doe 44
INPUT:
<Item>
<SomeRandomField>abc</SomeRandomField>
<Details>
<Detail>
<Price>7.00</Price
<CustomerName>John Smith</CustomerName>
</Detail>
</Details>
<ItemType>
<Key>1</Key>
<Name>Book</Name>
</ItemType>
</Item>
<Item>
<SomeRandomField>mno</SomeRandomField>
<Details>
<Detail>
<Price>45.00</Price
<CustomerName>John Smith</CustomerName>
</Detail>
</Details>
<ItemType>
<Key>2</Key>
<Name>DVD</Name>
</ItemType>
</Item>
<Item>
<SomeRandomField>xyz</SomeRandomField>
<Details>
<Detail>
<Price>44.00</Price
<CustomerName>Jane Doe</CustomerName>
</Detail>
</Details>
<ItemType>
<Key>2</Key>
<Name>DVD</Name>
</ItemType>
</Item>