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

XSLT eval()

Subject: XSLT eval()
From: John Lam <jlam@xxxxxxxxxxxx>
Date: Sun, 20 Feb 2000 17:19:21 -0500
xslt eval
As the archives aren't available, I don't know if this issue has been
discussed already on this list, so my apologies if this is the case ...

Have there been discussions with regard to adding the equivalent of the
JavaScript eval() function to XSLT / XPath as either a core function or as
an add-on extension function?

There are cases where one would really like to have some parameterized
evaluation, the case of <xsl:sort> comes to mind virtually right away.

Consider this XSLT frag:

<xsl:param name="COLUMN select="name"/>
...

<xsl:for-each select="item">
  <xsl:sort select="$COLUMN"/>
...

It doesn't evaluate to what you would want to since $COLUMN is not evaluated
to return a node-set at run-time. Instead the string expression of $COLUMN
(e.g. "name") is inserted into the select attribute at run-time.

Instead, if we could write:

<xsl:param name="COLUMN select="name"/>
...
<xsl:for-each select="item">
  <xsl:sort select="extensionFunctionNamespace:eval( $COLUMN )"/>
...

this would provide the best of both worlds, no? And shouldn't this be
relatively straightforward to add to one of the existing XSLT
implementations assuming that it has a fairly modular XPath implementation?
Or is there something that I'm missing here?

Regards,
-John


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • XSLT eval()
    • John Lam - Sun, 20 Feb 2000 17:19:21 -0500 <=
      • James - Sat, 20 Feb 1999 17:13:36 -0700
      • <Possible follow-ups>
      • Kay Michael - Mon, 21 Feb 2000 09:53:02 -0000
      • John Lam - Mon, 21 Feb 2000 08:00:48 -0500

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.