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: Wed, 14 Mar 2001 10:35:55 -0000
>
> I tried it and it works!!!  But it is a mystery what exactly is
> saxon:evaluate() doing?

It takes as argument a string containing an XPath expression, and it
evaluates this expression using the same context (e.g. context node,
namespaces, variables) as the context of the evaluate() function call.
>
> Is $container//account/person/@name a valid XPath expression?
>
Yes
>
> Do I need an extra slash between $container and the $path?
>
I don't know, it depends on your data. Is the <account> element a child of
the nodes in $container, or a descendant?

Mike Kay
Software AG


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


Current Thread