Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
XML
Elements within elements
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jyrki Keisala, post: 779425"] 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... [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
XML
Elements within elements
Top