[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

Subject: Re: 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
xpa problems
"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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.