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="a_j_moran, post: 779428"] Given that you stated already that each command element must have at least one key associated with it the best approach might be to associate a template with the "command" element that also processes the first "key" child line - further "key" element processing should be done in a seperate template invoked with the appropriate predicate (this avoids the expense of position checking on each invocation of the key template). in sum: <xsl:template match="command"> <tr> <td>...cmd elements...</td> <td>...markup with ref to first key <xsl:value-of select="key[1]" /></td> </tr> <!-- continue processing of subsequent keys --> <xsl:apply-templates select="key[position() > 1]" /> <xsl:template> <xsl:template match="key"> <tr> <!-- insert some spacer elements for correct alignment ;) --> <td> </td> <!-- now process the key attributes + values --> <td><xsl:value-of select="..etc..." /></td> </tr> <xsl:template> hth ajm. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
XML
Elements within elements
Top