Sorry for my English.
XSL 1.0. How can I to calculate expression from element or attribute value?
For example XML:
If your XSLT processor implements the EXSLT extensions, you can reference a function that dynamically evaluates strings as XPath expressions:
<xsl:stylesheet
version="1.0"
xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:dyn="http://exslt.org/dynamic"
extension-element-prefixes="dyn"
>
<xsl:template match="content">
<xsl:apply-templates select="positions/position" />
</xsl:template>
<xsl:template match="position">
<li>
<a target="frDocument" href="{dyn:evaluate(reference)}">
<xsl:value-of select="
$resources/lang:resources/lang:record[@id=current()/localizedName]
"/>
</a>
</li>
</xsl:template>
</xsl:stylesheet>
Note:
current()
function you might have missed<xsl:apply-templates>
and <xsl:template>
in favor of <xsl:for-each>