[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problems to interpret an attribute value as an Xpa
"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 [expletive deleted] sometimes. HTH J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|