Subject: Re: [xsl] Problems to interpret an attribute value as an Xpath expression From: Joerg Pietschmann <joerg.pietschmann@xxxxxx> Date: Thu, 10 Jan 2002 16:51:08 +0100 |
"Roman Huditsch" <roman.huditsch@xxxxxxxx> wrote: > I'd like to use the value of a ref attribute as an > XPath expression in my stylesheet. ... > I used a "normal" <xsl:value-of select="@ref"/> ,but > the processor didn't interpret it as an XPath expression > but as a string. Well, the processor evaulates the expression "@ref" and gets for example the string "/applicationform/applicant[1]/name" as a result. It won't evaulate this string again just because it looks like a XPath expression. After all, if the value of the attribute were "foo", you didn't expect the processor to do so, did you? > Does anyone know a method to tell the processor to use a > source document's attribute value as an XPath expression > in the stylesheet? There is no standardized way to do it. Most processors have extension functions like saxon:evaluate() for this purpose, look it up in the documentation. With MSXML you'll probably need some JScript. Seems i have to withdraw my objections about having evaluate() in the next XPath standard. Life sucks sometimes. HTH J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] pruebas, Aniceto López | Thread | [xsl] Sorting a variable that conta, rafael vazquez |
[xsl] pruebas, Pep Coll | Date | [xsl] pruebas, Aniceto López |
Month |