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

Re: The evaluate function

Subject: Re: The evaluate function
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Thu, 03 Jan 2002 18:47:38 +0000
cannot evaluate function
Hi Jeni,
On Thu, 3 Jan 2002 15:32:47 +0000, you wrote:

>Just to check that I'm following you correctly. You're saying that
>because the string passed to the evaluate() function could contain
>anything, the processor can't know whether it contains a reference to
>the $x variable in which the $x variable is treated as a node set, and
>therefore cannot optimise the storage of the $x variable.
>
Yes, thats it.

>In other words, the processor no longer has the opportunity to scan
>for uses of $x to work out what kind of value it is.
>
>I can see that's a problem. But couldn't the user could help the
>processor here by making the type of $x (and other global variables)
>explicit:
>
><xsl:variable name="x" type="xs:string">

Bear in mind its an example of a class of problems, offered in support
of Mike's comment about trying to obtain as much information as
possible statically.  Individually all these problems are soluble, of
course - but you have to think about how complex you make the
language.

>The possible performance hit is, in my opinion, not enough of a reason
>to omit a facility that makes the impossible possible.
>
Nothing is impossible ;-)

I also care about reliability.  If the compiler doesn't see half the
source code, it will also miss half the errors.  Some of which we'll
see on this list ;-((

I do worry that 'eval' could create more problems than it solves.  To
quote another message today:

>                    <xsl:value-of select="concat('/result/row[1]/column[', position(),']/@name')"/>                             

Could be the next disable-output-escaping!

Regards,
Trevor
--
Traditional training & distance learning,
Consultancy by email

Melvaig Software Engineering Limited
voice:     +44 (0) 1445 771 271 
email:     tcn@xxxxxxxxxxxxx

 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.