This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Okay, so you can't do dynamic XPaths..
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "Michael Peet" <mjpeet at hotmail dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 17 May 2002 23:37:25 +0100
- Subject: Re: [xsl] Okay, so you can't do dynamic XPaths..
- Organization: Jeni Tennison Consulting Ltd
- References: <F203SORH9HWP5RvITt70000172d@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Michael,
> Comments please? The syntax:
>
> select="@*[name() = $param-value-field]"/
>
> strikes me as being somewhat ugly. Is this the best I'm gonna get?
I'm afraid so. Some processors have an extension function that enables
you to evaluate strings as XPath expressions, e.g.:
select="saxon:evaluate(concat('@', $param-value-field))" />
But if you can do it portably, as with the expression you have above,
then you should do.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list