Re: Regular expression functions (Was: Re: [xsl] comments on December F&O draft)

Subject: Re: Regular expression functions (Was: Re: [xsl] comments on December F&O draft)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 11 Jan 2002 15:10:42 GMT
> Is it realistic to expect implementations to guarantee to return the
> same thing for any given combination of arguments for a particular
> function?

Yes for built in xpath functions. they are all (so far) defined so that
is true. Probably not for externally defined extension functions but
the behaviour of any expression using such function really can't be
specified in Xpath. For example currently given a variable definition
and three references to it, a system is free to evaluate the variable
once and use that value three times, or just to re-evaluate the
expression each time, or something in between. Mike's given examples on
ths list before now of the heuristics saxon uses to decide which to do.

If a variable definition uses a function that isn't guaranteed to return
the same result if called with the same arguments then it is legal for
a reference, $x, to that variable to produce different answers if it
appears twice in the same scope. this is something you really want to
avoid....

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