This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Evaluation of a string containing a valid XPath Pattern
- From: "Carsten Klein" <carstenklein at yahoo dot de>
- To: "XSL List" <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 18 Feb 2002 10:02:18 +0100
- Subject: [xsl] Evaluation of a string containing a valid XPath Pattern
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I was wondering if it is possible to retrieve a node set by evaluating a
global stylesheet parameter
which contains a valid XPath Expression.
Example
<xsl:stylesheet ...>
<xsl:param name="$gXPath"/>
<xsl:template match="/">
<xsl:value-of select="$gXPath"/>
</xsl:template>
</xsl:stylesheet>
The result would be the string value of $gXPath, but I would need the node
set referred to by $gXPath,
something like eval-xpath-expr($gXPath) or else would be great, any ideas? I
already came to the point
writing something parser-like, parsing the expression contained by $gXPath
and setting up variables to
retrieve the nodes in question, but this is too much overhead, since a lot
of nodes have to be processed
every time the stylesheet is invoked.
Is there a short hand way to do this? I don't want to / cannot use the
transformNode method of the Microsoft
XMLDOM, since I do need the whole xml document.
Thanks
Carsten Klein
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list