xsl-list
[Top] [All Lists]

Grouping by shift problem

2005-09-08 23:05:04
I have a shift doc (shifts.xml):

<shifts>
   <shift1 start='00:00:00' end='08:00:00'/>
   <shift2 start='08:00:00' end='16:00:00'/>
   <shift3 start='16:00:00' end='00:00:00'/>
</shifts>

That I want as a lookup table

Now I have anoher doc (departures.xml) with depart times and such:

<departs>
   <door>
   <time>2005-06-12T15:02:06</time>
   <name>Joe Somebody</name>
   <dock>032</dock>
   </door>
   <door>
   <time>2005-06-13T17:03:56</time>
   <name>Joe Somebodyelse</name>
   <dock>055</dock>
   </door>
   ...
</departs>

How do I group the <time> elements by shift?

like thus,
<alldeparts>
<shift2>
   <depart>
   <name>Joe Somebody</name>
   <time>2005-06-13T17:03:56</time>
   <dock>055</dock>
   </depart>
...
</shift2>
<shift3>
   <depart>
   <time>2005-06-13T17:03:56</time>
   <name>Joe Somebodyelse</name>
   <dock>055</dock>
   </depart>
...
</shift3>
...
</alldeparts>
etc.

Thanks in advance, Kent


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>