I want to group the following XML:
<DataSet>
<FirstNode>
<UniqueKey>111</UniqueKey>
<OtherKey>552</OtherKey>
</FirstNode>
<FirstNode>
<UniqueKey>123</UniqueKey>
<OtherKey>552</OtherKey>
</FirstNode>
<FirstNode>
<UniqueKey>154</UniqueKey>
<OtherKey>553</OtherKey>
</FirstNode>
<SecondNode>
<FirstNodeKey>111</FirstNodeKey>
</SecondNode>
<SecondNode>
<FirstNodeKey>123></FirstNodeKey>
</SecondNode>
<SecondNode>
<FirstNodeKey>154></FirstNodeKey>
</SecondNode>
</DataSet>
I want to produce the following xml with XSLT:
<DataSet>
<FirstNode>
<UniqueKey>111</UniqueKey>
<OtherKey>552</OtherKey>
</FirstNode>
<FirstNode>
<UniqueKey>123</UniqueKey>
<OtherKey>552</OtherKey>
</FirstNode>
<SecondNode>
<FirstNodeKey>111</FirstNodeKey>
</SecondNode>
<SecondNode>
<FirstNodeKey>123></FirstNodeKey>
</SecondNode>
</DataSet>
<DataSet>
<FirstNode>
<UniqueKey>154</UniqueKey>
<OtherKey>553</OtherKey>
</FirstNode>
<SecondNode>
<FirstNodeKey>154></FirstNodeKey>
</SecondNode>
</DataSet>
Basically I want to group the FirstNodes by the OtherKey first, and then group by the UniqueKey and FirstNodeKey. Then each should be enclosed in <DataSet></DataSet>
. Can I do this by using grouping?
Thanks in advance for your help!