C
Christian Roth
Hi,
how do I access the contents of a variable (or param) whose name is
computed?
Pseudo-code for demonstration, NOT WORKING:
....
<xslaram name="table.frame.void">border: none;</xslaram>
<xslaram name="table.frame.box">border: 1pt solid black;</xslaram>
....
<xsl:template match="table">
<table style="{$table.frame.{@frame}}"> <!-- ### -->
...
</xsl:template>
What I intend is to compute the name of the variable to be accessed
using some constant prefix ('table.frame.') and the contents of the
element's 'frame' attribute.
Nested {...}'s are not allowed, and some other attempts of mine did not
work (like "{$concat( 'table.frame.', @frame)}").
How can I achieve this?
how do I access the contents of a variable (or param) whose name is
computed?
Pseudo-code for demonstration, NOT WORKING:
....
<xslaram name="table.frame.void">border: none;</xslaram>
<xslaram name="table.frame.box">border: 1pt solid black;</xslaram>
....
<xsl:template match="table">
<table style="{$table.frame.{@frame}}"> <!-- ### -->
...
</xsl:template>
What I intend is to compute the name of the variable to be accessed
using some constant prefix ('table.frame.') and the contents of the
element's 'frame' attribute.
Nested {...}'s are not allowed, and some other attempts of mine did not
work (like "{$concat( 'table.frame.', @frame)}").
How can I achieve this?