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

Re: expression must evaluate to a nodeset / shortcuts

Subject: Re: expression must evaluate to a nodeset / shortcuts !
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 5 Nov 2002 11:23:00 GMT
evaluate to a node set
> Is there a workaround for this?

not really. Some systems have an evaluate fextension function to
evaluate a string as an Xpath. But you ask

> Why i can use

but the question is  "why would you expect that" (and others too, you are
not teh first to ask, this is a FAQ)

Most languages have the same restriction.

after

<xsl:variable name="path" select=" '/root/body/filter/df/@name'  "/>


$path is a _string_ containing a bit of XPath syntax.
so

<xsl:value-of select="$path='gspkennung'/@title"/>

is legal but means the same as


<xsl:value-of select="'/root/body/filter/df/@name'='gspkennung'/@title"/>
and tests those two strings.

this is just the same as C or most otehr languages, in C if you have the
string "x + y" you can't easily get from there to the sum of teh
variables x and y unless you write a parser for teh string that maps
that string syntax to the expression language. That's what the
xx:evaluate() function does for you if your system has that extension
(saxon and xalan at least have such an extension)

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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.