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]

RE: dynamically change xpath expression with params


> 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

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