Scherler, Thorsten wrote:
with (where *expr* is a parameter parsed from a formular):
expr=date[date='Nov 28']
...
<xsl:param name="expr" />
...
<xsl:apply-templates select="{$expr}"/>
This is not working, neither *select="$expr"*, nor *select="'{$expr}'"*

The value of the select attribute must be an XPath expression itself, and it must evaluate into a node set. The first, {$expr}, is not a valid XPath expression. The second, $expr, evaluates to the string 'date[date='Nov 28']', which is not a node set. The third evaluates to the string '{$expr}' which still isn't a node set.

(or I did something wrong). I came to the conclusion that you can't use dynamic XPath expression.

Not in standard XSLT. Xalan should support the EXSLT dynamic functions, specifically evaluate(): http://exslt.org/dyn/functions/evaluate/index.html

Don't expect it to be blindingly fast (though not as bad as dynamic
SQL compared to prepared statements).

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to