eval evaluate in xslt

Saxon:evaluate

1. computed path expression

1.

computed path expression

Michael Kay



> If I compute a path expression on the fly, how can I select it?
> 
> For example:
> <xsl:variable name="element">foo/bar</xsl:variable>
> 
> <xsl:apply-templates select="$element"/>
> 




You can't do this in standard XSLT. Use the saxon:evaluate() extension
function:
<xsl:apply-templates select="saxon:evaluate($element)"/>