Using XSLT, how can I produce a table with elements at the position of the the node's attributes?
- by Dr. Sbaitso
Given the following XML:
<items>
<item>
<name>A</name>
<address>0</address>
<start>0</start>
<size>2</size>
</item>
<item>
<name>B</name>
<address>1</address>
<start>2</start>
<size>4</size>
</item>
<item>
<name>C</name>
<address>2</address>
<start>5</start>
<size>2</size>
</item>
</items>
I want to generate the following output including colspan's
+---------+------+------+------+------+------+------+------+------+
| Address | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+---------+------+------+------+------+------+------+------+------+
| 0 | | | | | | | A |
+---------+------+------+------+------+------+------+------+------+
| 1 | | | B | | |
+---------+------+------+------+------+------+------+------+------+
| 2 | | C | | | | | |
+---------+------+------+------+------+------+------+------+------+
| 3 | | | | | | | | |
+---------+------+------+------+------+------+------+------+------+
I think I would be able to accomplish this with a mutable xslt variable, but alas, there's no such thing.
Is it even possible? How?