[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: Okay, so you can't do dynamic XPaths..
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 17 May 2002 23:37:25 +0100
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


Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member