N
n.phelge
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>20070704</StartDate>
<EndDate>20071231</EndDate>
</Flavor>
<Flavor>
<Name>Chocolate</Name>
<StartDate>20070704</StartDate>
<EndDate>20071131</EndDate>
</Flavor>
<Flavor>
<Name>Strawberry</Name>
<StartDate>20070804</StartDate>
<EndDate>20071131</EndDate>
</Flavor>
<Flavor>
<Name>Mint</Name>
<StartDate>20070704</StartDate>
<EndDate>20071131</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>20070704</StartDate>
<EndDate>20071231</EndDate>
</Group>
<Group>
<Name>Group2</Name>
<Flavors>
<Name>Chocolate</Name>
<Name>Mint</Name>
</Flavors>
<StartDate>20070704</StartDate>
<EndDate>20071131</EndDate>
</Group>
<Group>
<Name>Group3</Name>
<Flavors>
<Name>Strawberry</Name>
</Flavors>
<StartDate>20070804</StartDate>
<EndDate>20071231</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
by multiple values, and I'm not succeeding. I have source XML that
looks like the following:
<Data>
<Flavor>
<Name>Vanilla</Name>
<StartDate>20070704</StartDate>
<EndDate>20071231</EndDate>
</Flavor>
<Flavor>
<Name>Chocolate</Name>
<StartDate>20070704</StartDate>
<EndDate>20071131</EndDate>
</Flavor>
<Flavor>
<Name>Strawberry</Name>
<StartDate>20070804</StartDate>
<EndDate>20071131</EndDate>
</Flavor>
<Flavor>
<Name>Mint</Name>
<StartDate>20070704</StartDate>
<EndDate>20071131</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>20070704</StartDate>
<EndDate>20071231</EndDate>
</Group>
<Group>
<Name>Group2</Name>
<Flavors>
<Name>Chocolate</Name>
<Name>Mint</Name>
</Flavors>
<StartDate>20070704</StartDate>
<EndDate>20071131</EndDate>
</Group>
<Group>
<Name>Group3</Name>
<Flavors>
<Name>Strawberry</Name>
</Flavors>
<StartDate>20070804</StartDate>
<EndDate>20071231</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