Using XML in this format:
<?xml version="1.0"?>
<GetResult version="1.0">
<Fetch>
<StartTime>2004-08-01 00:00:00</StartTime>
<EndTime>2004-08-01 00:00:00</EndTime>
</Fetch>
<Items>
<Item>
<Name>Item Name Number 1</Name>
<Data>
<Datum>
<Timestamp>2004-07-31 16:00:00+00:00</Timestamp>
<Value><![CDATA[25]]></Value>
</Datum>
<Datum>
<Timestamp>2004-07-31 18:00:00+00:00</Timestamp>
<Value><![CDATA[35]]></Value>
</Datum>
</Data>
</Item>
<Item>
<Name>Item Number 2</Name>
<Data>
<Datum>
<Timestamp>2004-07-31 16:00:00+00:00</Timestamp>
<Value><![CDATA[45]]></Value>
</Datum>
<Datum>
<Timestamp>2004-07-31 17:00:00+00:00</Timestamp>
<Value><![CDATA[55]]></Value>
</Datum>
<Datum>
<Timestamp>2004-07-31 18:00:00+00:00</Timestamp>
<Value><![CDATA[65]]></Value>
</Datum>
</Data>
</Item>
</Items>
</GetResult>
I'd like to be able to produce a table like so, using XSLT:
<table>
<tr>
<th>Timestamp</th>
<th>Item Name Number 1</th>
<th>Item Number 2</th>
</tr>
<tr>
<td>2004-07-31 16:00:00+00:00</td>
<td>25</td>
<td>45</td>
</tr>
<tr>
<td>2004-07-31 17:00:00+00:00</td>
<td></td>
<td>55</td>
</tr>
<tr>
<td>2004-07-31 18:00:00+00:00</td>
<td>35</td>
<td>65</td>
</tr>
</table>
This would have to work regardless of how many Items are returned and how many Datums under each item. I've read some other answers which are similar without any luck. I'm fairly new to XSLT and it is driving me crazy. A solution for this would be greatly appreciated.