Say I have an xml document consisting of a list as shown below:
<Items>
<Item>First Item</Item>
<Item>Second Item</Item>
<Item>Third Item</Item>
<Item>4</Item>
<Item>Five</Item>
</Items>
I want to convert it to a html table with two columns for the Item elements (I'm not fussed at the moment whether it's ordererd top-bottom-left-right or left-right-top-bottom).
<table>
<tr>
<td>First Item</td>
<td>Second Item</td>
</tr>
<tr>
<td>Third Item</td>
<td>4</td>
</tr>
<tr>
<td>Five</td>
<td></td>
</tr>
</table>
I understand I can get a table with a single column with the following xslt transform, but can't figure out how to get multiple columns.
<table>
<xsl:for-each select="Items">
<tr>
<td><xsl:value-of select="Item"/></td>
</tr>
</xsl:for-each>
</table>