G
Gadrin77
I'm looking to create a list/report using the following XML...
<Root>
<Contact Name="Joe" Level="9" Class="Customer"/>
<Contact Name="Jim" Level="7" Class="Customer"/>
<Contact Name="Bob" Level="2" Class="Employee"/>
<Contact Name="Fred" Level="8" Class="Customer"/>
<Contact Name="Tom" Level="3" Class="Customer"/>
<Contact Name="Marty" Level="3" Class="Customer"/>
<Contact Name="Mike" Level="6" Class="Customer"/>
<Contact Name="Suzi" Level="10" Class="Customer"/>
<Contact Name="Sarah" Level="1" Class="Vendor"/>
<Contact Name="Dylan" Level="5" Class="Employee"/>
</Root>
The idea is to Group by Class, then Group each Contact by Level within that
class, then break, move to the Next Class and do the same...
Customer
Level 3: Marty, Tom.
Level 6: Mike.
Level 7: Jim.
Level 8: Fred.
Level 9: Joe.
Level 10: Suzi.
Employee
Level 2: Bob.
Level 5: Dylan.
Vendor
Level 1: Sarah.
It looks like I need to generate unique ids or use a key for each CLASS,
then build another key based on levels. But I'm not able to visualize how
to do it in XSL. Recursive template???
I'm using MS XML SDK 4.0 SP2.
<Root>
<Contact Name="Joe" Level="9" Class="Customer"/>
<Contact Name="Jim" Level="7" Class="Customer"/>
<Contact Name="Bob" Level="2" Class="Employee"/>
<Contact Name="Fred" Level="8" Class="Customer"/>
<Contact Name="Tom" Level="3" Class="Customer"/>
<Contact Name="Marty" Level="3" Class="Customer"/>
<Contact Name="Mike" Level="6" Class="Customer"/>
<Contact Name="Suzi" Level="10" Class="Customer"/>
<Contact Name="Sarah" Level="1" Class="Vendor"/>
<Contact Name="Dylan" Level="5" Class="Employee"/>
</Root>
The idea is to Group by Class, then Group each Contact by Level within that
class, then break, move to the Next Class and do the same...
Customer
Level 3: Marty, Tom.
Level 6: Mike.
Level 7: Jim.
Level 8: Fred.
Level 9: Joe.
Level 10: Suzi.
Employee
Level 2: Bob.
Level 5: Dylan.
Vendor
Level 1: Sarah.
It looks like I need to generate unique ids or use a key for each CLASS,
then build another key based on levels. But I'm not able to visualize how
to do it in XSL. Recursive template???
I'm using MS XML SDK 4.0 SP2.