This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How to specify a path to a node in a nodeset using a variable
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] How to specify a path to a node in a nodeset using a variable
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 9 Mar 2001 17:25:02 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> >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