XSL/XPATH compose string and use it as a variable name
Posted: Wed Oct 31, 2007 1:45 pm
Hi guys,
there is something i needed many times. Is it possible to compose a string and use it to call an existing variable. XPath allways see only the string.
The the call:
there is something i needed many times. Is it possible to compose a string and use it to call an existing variable. XPath allways see only the string.
Code: Select all
<xsl:variable name="page-width-1">
<xsl:variable name="page-width-2">
...
<xsl:variable name="page-width-n">
Code: Select all
<xsl:variable name="result"
select="for $tab in $schr-tabs
<xsl:value-of select="concat('$', 'page-width-', '')">