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]
Other format: [Raw text]

RE: Evaluation of a string containing a valid XPath Pattern


You need the xx:evaluate() extension function which is available in some
processors, for example Xalan and Saxon.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com

> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of
> Carsten Klein
> Sent: 18 February 2002 09:02
> To: XSL List
> Subject: [xsl] Evaluation of a string containing a valid XPath Pattern
>
>
> 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
>


 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]