Example 1:
<time>
<timestamp>01:00</timestamp>
<event>arrived<event>
</time>
<time>
<timestamp>02:00</timestamp>
<event>left<event>
</time>
Example 2:
<time>
<timestamp>02:00</timestamp>
<event>left<event>
</time>
The XSLT needs to do:
- FOR EACH node DO:
- IF event=arrived THEN set eventtype=atdestination
- IF event=left is found AND event=arrived is found THEN set new node type=leftdestination ELSE set type=left
XSLT applied to example 1:
<event>
<time>01:00</time>
<type>atdestination</type>
<event>
<event>
<time>02:00</time>
<type>leftdestination</type>
<event>
XSLT applied to example 2:
<event>
<time>02:00</time>
<type>left</type>
<event>