Page 1 of 1

grouping in xslt as a single node instead of group of nodes

Posted: Fri Jun 27, 2008 1:14 pm
by gaziebasha
Hi,

I have my xml like below

<compType>
<round roundNumber =1 name"xyz">
<fixture fixtureId="1063" status="NotStarted" >
</round>
<round roundNumber =1 name"dgb">
<fixture fixtureId="334" status="NotStarted" >
</round>
<round roundNumber =2 name"dgb">
<fixture fixtureId="334" status="NotStarted" >
</round>
</compType>

I know I can group the rounds with the same round number but still that group is returning a group of round nodes. But I want just one round node with all child elements of all rounds are copied into one whose round numbers are same such as below

<compType>
<round roundNumber =1 name"xyz">
<fixture fixtureId="1063" status="NotStarted" >
<fixture fixtureId="334" status="NotStarted" >
</round>
<round roundNumber =2 name"dgb">
<fixture fixtureId="334" status="NotStarted" >
</round>
</compType>

Your help will be highly appriciated

Thanks,
Gazi