[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Something like eval()? and Thanks!

Subject: Re: Something like eval()? and Thanks!
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 7 Nov 2001 15:13:03 +0000
xalan eval
Hi Marty,

> Is there any way to force a string of the format "$foo" to evaluate
> into the matching parameter named $foo.

Only using extension functions. If you're using Saxon, you can use
saxon:evaluate(). Xalan has xalan:evaluate() which does roughly the
same thing.

The only problem is the availability of the variable bindings within
the extension function. Normally with this kind of question I'd say
that you can write your own with MSXML, but you're talking about
evaluating a variable, and I don't think that a user-defined function
would have access to those variable assignments. I got an error when I
tried accessing a variable with xalan:evaluate() as well.

Many of us are hoping that dynamic evaluation of XPaths will be
incorporated into XPath/XSLT 2.0 (though it's not on the
requirements).

> What i'm hoping for is a more generic parameter matching system, where my
> XML might look like:
> <a href="foo.htm?custID={$custID}">My Account</a>

If you had the above *in a stylesheet* then it would do exactly what
you wanted to do. So you could generate the stylesheet that you want
from the XML template, and then run that stylesheet to get the result
you're after.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.