I have list of Variables defined and imported in current XSL.
$varA --> 10
$varB --> 20
$varC --> 30
In current XSL, I get value of 'varA' or 'varB' or 'varC' dynamically and keep in variable called 'VarDynamic' ${$VarDynamic} is not working as expected. I have to pass dynamically variable name from another variable
VariableList.xsl
<xsl:variable name="varA" select="10"></xsl:variable>
<xsl:variable name="varB" select="20"></xsl:variable>
<xsl:variable name="varC" select="30"></xsl:variable>
DynamicList.xsl
<xsl:import href="VariableList.xsl"/>
<xsl:template match="/">
<xsl:variable name="DynamicVar">
<xsl:choose>
<xsl:when test="/A">
<xsl:value-of select="'varA'"/>
</xsl:when>
<xsl:when test="/B">
<xsl:value-of select="'varB'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'varC'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<Result>
<xsl:value-ofselect="${$DynamicVar}"/>
</Result>
Can you please advise on this.