C
cardinallijr
Hi all, sorry about the simple question but I'm new to XSL. I have a
XML with 5 elements, for example:
<root>
<products>
<product>
<id>1</id>
</product>
<product>
<id>2</id>
</product>
<product>
<id>3</id>
</product>
<product>
<id>4</id>
</product>
<product>
<id>5</id>
</product>
</products>
</root>
What I want to do is to generate a HTML table with N rows(depending of
the number of elements) and 2 columns(2
products) for each row. For example:
<table>
<tr>
<td>Product 1</td>
<td>Product 2</td>
</tr>
<tr>
<td>Product 3</td>
<td>Product 4</td>
</tr>
<tr>
<td>Product 5</td>
</tr>
</table>
I've tried a lot of ways to do it with a XSL but couldn't get this to
work.
Please, Do you have an idea ?
P.S.: Sorry about my english.
XML with 5 elements, for example:
<root>
<products>
<product>
<id>1</id>
</product>
<product>
<id>2</id>
</product>
<product>
<id>3</id>
</product>
<product>
<id>4</id>
</product>
<product>
<id>5</id>
</product>
</products>
</root>
What I want to do is to generate a HTML table with N rows(depending of
the number of elements) and 2 columns(2
products) for each row. For example:
<table>
<tr>
<td>Product 1</td>
<td>Product 2</td>
</tr>
<tr>
<td>Product 3</td>
<td>Product 4</td>
</tr>
<tr>
<td>Product 5</td>
</tr>
</table>
I've tried a lot of ways to do it with a XSL but couldn't get this to
work.
Please, Do you have an idea ?
P.S.: Sorry about my english.