Table with 2 columns
Posted: Tue Jan 06, 2009 1:04 am
Hi,
I am quite new to XSL and have maybe a simple problem, but i am not sure what the best solution might be.
imagine a xml file:
<root>
<number> 1 </number>
<number> 2 </number>
<number> 3 </number>
<number> 4 </number>
<number> 5 </number>
</root>
I would like to put this numbers into a table with 2 columns.
imagine a table:
column1--column2
1------------------ 2
3------------------ 4
5---------
The point is, that i do not know how many numbers/table-cells there are. There might be 5 or 99.
So, is it possible to count the <number> nodes and automaticly put the 1. 3. 5. etc nodes in the first/left column and 2. 4. 6. etc in the second/right column?
I am trying to figure the code out, but if someone could write it here, that would be really awesome!
I am quite new to XSL and have maybe a simple problem, but i am not sure what the best solution might be.
imagine a xml file:
<root>
<number> 1 </number>
<number> 2 </number>
<number> 3 </number>
<number> 4 </number>
<number> 5 </number>
</root>
I would like to put this numbers into a table with 2 columns.
imagine a table:
column1--column2
1------------------ 2
3------------------ 4
5---------
The point is, that i do not know how many numbers/table-cells there are. There might be 5 or 99.
So, is it possible to count the <number> nodes and automaticly put the 1. 3. 5. etc nodes in the first/left column and 2. 4. 6. etc in the second/right column?
I am trying to figure the code out, but if someone could write it here, that would be really awesome!