J
Jyrki Keisala
Hi,
I am trying to transform an XML file into a HTML table with XSLT. The
structure of my XML file is roughly this:
<profile>
<command name="..." phrase="...">
<key extended="..." pause="... repeat="..." duration="..."/>
...
<key extended="..." pause="... repeat="..." duration="..."/>
</command>
<command name="..." phrase="...">
<key extended="..." pause="... repeat="..." duration="..."/>
...
<key extended="..." pause="... repeat="..." duration="..."/>
</command>
...
</profile>
So, for every "command" element, there is one to many "key" elements. I
want to translate this structure to a simple HTML table that looks like
Command Key
Name Phrase Extended Pause Repeat Duration
-------------------------------------------------------------------
cmd1 cmd1 key1 key1 key1 key1
key2 key2 key2 key2
cmd2 cmd2 key1 key1 key1 key1
cmd3 cmd3 key1 key1 key1 key1
key2 key2 key2 key2
key3 key3 key3 key3
....
--------------------------------------------------------------------
(Tried to use TABs but am not sure whether the relative font will screw
up the structure of the table in my posting.)
Now handling command elements with only one key element inside is very
easy, as everything is put into a single row. My problem is how to handle
multiple key elements inside a command element, such that the data in the
subsequent key elements begins in its own row, from column 3.
There probably is a very obvious solution to this...
I am trying to transform an XML file into a HTML table with XSLT. The
structure of my XML file is roughly this:
<profile>
<command name="..." phrase="...">
<key extended="..." pause="... repeat="..." duration="..."/>
...
<key extended="..." pause="... repeat="..." duration="..."/>
</command>
<command name="..." phrase="...">
<key extended="..." pause="... repeat="..." duration="..."/>
...
<key extended="..." pause="... repeat="..." duration="..."/>
</command>
...
</profile>
So, for every "command" element, there is one to many "key" elements. I
want to translate this structure to a simple HTML table that looks like
Command Key
Name Phrase Extended Pause Repeat Duration
-------------------------------------------------------------------
cmd1 cmd1 key1 key1 key1 key1
key2 key2 key2 key2
cmd2 cmd2 key1 key1 key1 key1
cmd3 cmd3 key1 key1 key1 key1
key2 key2 key2 key2
key3 key3 key3 key3
....
--------------------------------------------------------------------
(Tried to use TABs but am not sure whether the relative font will screw
up the structure of the table in my posting.)
Now handling command elements with only one key element inside is very
easy, as everything is put into a single row. My problem is how to handle
multiple key elements inside a command element, such that the data in the
subsequent key elements begins in its own row, from column 3.
There probably is a very obvious solution to this...