![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - RE: Multiple Groups in XSLT Multiple Groups in XSLTTo: NULL Date: 8/3/2007 12:26:00 PM
I'm trying to take a flat XML file and transform it so that it has some
depth. I played around trying to group witihin a group - 2 keys, nested
for-each's... No luck.
I've looked at some newgroup listings about compound keys using concat -
didn't really grasp it.
So, I want to take a flat XML file that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<DataSet_Studio_Appt_Dates>
<Studio_Appt_Date_Times>
<bus_unit_id>2405</bus_unit_id>
<sched_date>8/7/2007 12:00:00 AM</sched_date>
<sched_day_text>Tue</sched_day_text>
<sched_time>11:00:00</sched_time>
<time_range_descr>Before Noon</time_range_descr>
</Studio_Appt_Date_Times>
<Studio_Appt_Date_Times>
<bus_unit_id>2405</bus_unit_id>
<sched_date>8/7/2007 12:00:00 AM</sched_date>
<sched_day_text>Tue</sched_day_text>
<sched_time>11:30:00</sched_time>
<time_range_descr>Before Noon</time_range_descr>
</Studio_Appt_Date_Times>
<Studio_Appt_Date_Times>
<bus_unit_id>2405</bus_unit_id>
<sched_date>8/8/2007 12:00:00 AM</sched_date>
<sched_day_text>Wed</sched_day_text>
<sched_time>12:00:00</sched_time>
<time_range_descr>Noon to 3PM</time_range_descr>
</Studio_Appt_Date_Times>
<Studio_Appt_Date_Times>
<bus_unit_id>2405</bus_unit_id>
<sched_date>8/8/2007 12:00:00 AM</sched_date>
<sched_day_text>Wed</sched_day_text>
<sched_time>13:00:00</sched_time>
<time_range_descr>Noon to 3PM</time_range_descr>
</Studio_Appt_Date_Times>
<Studio_Appt_Date_Times>
<bus_unit_id>2405</bus_unit_id>
<sched_date>8/8/2007 12:00:00 AM</sched_date>
<sched_day_text>Wed</sched_day_text>
<sched_time>15:30:00</sched_time>
<time_range_descr>3PM to 6PM</time_range_descr>
</Studio_Appt_Date_Times>
<Studio_Appt_Date_Times>
<bus_unit_id>2405</bus_unit_id>
<sched_date>8/8/2007 12:00:00 AM</sched_date>
<sched_day_text>Wed</sched_day_text>
<sched_time>16:00:00</sched_time>
<time_range_descr>3PM to 6PM</time_range_descr>
</Studio_Appt_Date_Times>
</DataSet_Studio_Appt_Dates>
And group it by dates and time ranges so that it looks like this:
<Studio_Appt_Data>
<bus_unit_id>2405</bus_unit_id>
<Studio_Appt_Dates>
<Studio_Appt_Date>8/7/2007 12:00:00 AM</Studio_Appt_Date>
<Time_Ranges>
<Time_Range>
<time_range_str>Before Noon</time_range_str>
<appt_times>
<appt_time>11:00</appt_time>
<appt_time>11:30</appt_time>
</appt_times>
</Time_Range>
</Studio_Appt_Dates>
<Studio_Appt_Date>8/8/2007 12:00:00 AM</Studio_Appt_Date>
<Time_Ranges>
<Time_Range>
<time_range_str>Noon to 3PM</time_range_str>
<appt_times>
<appt_time>12:00</appt_time>
<appt_time>13:00</appt_time>
</appt_times>
</Time_Range>
<Time_Range>
<time_range_str>3PM to 6PM</time_range_str>
<appt_times>
<appt_time>15:30</appt_time>
<appt_time>16:00</appt_time>
</appt_times>
</Time_Range>
</Studio_Appt_Dates>
Thanks!
Joel Brimm.
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
