Altova Mailing List Archives


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

From: David Carlisle <davidc@--------->
To:
Date: 1/11/2002 5:10:00 AM
> 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

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.