I'm using XSLT and .NET Framework 1.1 to try to transform XML to group
by multiple values, and I'm not succeeding. I have source XML that
looks like the following:
<Data>
<Flavor>
<Name>Vanilla </Name>
<StartDate>2007 0704</StartDate>
<EndDate>200712 31</EndDate>
</Flavor>
<Flavor>
<Name>Chocolate </Name>
<StartDate>2007 0704</StartDate>
<EndDate>200711 31</EndDate>
</Flavor>
<Flavor>
<Name>Strawberr y</Name>
<StartDate>2007 0804</StartDate>
<EndDate>200711 31</EndDate>
</Flavor>
<Flavor>
<Name>Mint</Name>
<StartDate>2007 0704</StartDate>
<EndDate>200711 31</EndDate>
</Flavor>
</Data>
I need to group the items together that have the same values for
StartDate and EndDate such that the output looks like the following:
<Groups>
<Group>
<Name>Group1</Name>
<Flavors>
<Name>Vanilla </Name>
</Flavors>
<StartDate>2007 0704</StartDate>
<EndDate>200712 31</EndDate>
</Group>
<Group>
<Name>Group2</Name>
<Flavors>
<Name>Chocolate </Name>
<Name>Mint</Name>
</Flavors>
<StartDate>2007 0704</StartDate>
<EndDate>200711 31</EndDate>
</Group>
<Group>
<Name>Group3</Name>
<Flavors>
<Name>Strawberr y</Name>
</Flavors>
<StartDate>2007 0804</StartDate>
<EndDate>200712 31</EndDate>
</Group2>
</Groups>
I've tried to use the Muenchian Method with keys, but I haven't been
successful. Can anyone please provide some assistance?
Thanks in advance