This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: dynamically change xpath expression with params
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: dynamically change xpath expression with params
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Thu, 2 Nov 2000 17:21:22 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
> Is this possible?
>
> I need to change both the values in an XPath Expression at
> runtime.
This is becoming a FAQ, the answer is:
Not in standard XSLT: XPath expressions cannot be constructed from strings.
There are three possible solutions:
a) generate or modify the XSLT stylesheet immediately before executing it
b) use the Saxon saxon:evaluate() extension function
c) for a limited subset of cases, use constructs such as
select="*[name()=$param]"
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list