RE: [xsl] How to specify a path to a node in a nodeset using a variable

Subject: RE: [xsl] How to specify a path to a node in a nodeset using a variable
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 9 Mar 2001 17:25:02 -0000
> >Saxon (and I think several other products, now) has an
> evaluate() extension
> >function that will do this for you.
>
> xalan:evaluate($path)  or saxon:evaluate($path) are indeed a
> way to acheive
> this but not completely.  Since, I cannot change the current
> nodeset to
> which this evaluate() function is applied.  If you recall I need to
> evaluate($path) to the $container nodeset.

No, you can just do "evaluate(concat('$container/', $path))"

(Or you can in Saxon. I don't know if xalan:evaluate() allows the XPath
expression to contain a variable reference, but saxon:evaluate() does.)

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread