This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Okay, so you can't do dynamic XPaths..


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]