K
kanpeter
given an xml file:
<data>
<invoices>
<invoice type="A">111</invoice>
<invoice type="B">222</invoice>
<invoice type="C">333</invoice>
</invoices>
<invoices>
<invoice type="C">444</invoice>
<invoice type="B">555</invoice>
<invoice type="A">666</invoice>
</invoices>
<invoices>
<invoice type="C">777</invoice>
<invoice type="A">999</invoice>
</invoices>
</data>
how can i write an xslt to output the following?
<table border="1">
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
</tr>
<tr>
<td>111</td>
<td>222</td>
<td>333</td>
</tr>
<tr>
<td>666</td>
<td>555</td>
<td>444</td>
</tr>
<tr>
<td>999</td>
<td>--</td>
<td>777</td>
</tr>
</table>
<data>
<invoices>
<invoice type="A">111</invoice>
<invoice type="B">222</invoice>
<invoice type="C">333</invoice>
</invoices>
<invoices>
<invoice type="C">444</invoice>
<invoice type="B">555</invoice>
<invoice type="A">666</invoice>
</invoices>
<invoices>
<invoice type="C">777</invoice>
<invoice type="A">999</invoice>
</invoices>
</data>
how can i write an xslt to output the following?
<table border="1">
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
</tr>
<tr>
<td>111</td>
<td>222</td>
<td>333</td>
</tr>
<tr>
<td>666</td>
<td>555</td>
<td>444</td>
</tr>
<tr>
<td>999</td>
<td>--</td>
<td>777</td>
</tr>
</table>