Subject: RE: [xsl] Evaluation of a string containing a valid XPath Pattern From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Mon, 18 Feb 2002 16:57:47 -0000 |
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@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Evaluation of a string co, Carsten Klein | Thread | [xsl] different results with xalan , Frank |
Re: [xsl] duplicate id's, Thomas B. Passin | Date | RE: [xsl] Lookup (?), Michael Kay |
Month |