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

RE: Better include them in the XSLT 2.0 spec (Was: Re:

Subject: RE: Better include them in the XSLT 2.0 spec (Was: Re: Time for an exslt for 2.0?)
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 13 May 2005 00:06:14 +0100
RE:  Better include them in the XSLT 2.0 spec (Was: Re:
> Is there some other mechanism which would be used to,
> for example, return a random number, other than a function?

There are various ways of designing functions to generate a (pseudo-)random
number sequence:

(a) a function that returns a sequence of random numbers (rather than just
one)

(b) a function that takes one number as input and generates a new number
from it

Having a function with no arguments that returns a different number each
time it's called is not a good design, because the optimizer is likely to
move it out of the processing loop. (This is also a danger with
node-creative functions, of course; but an optimizer can be expected to
analyze the function body to determine whether a function is node-creative
or not.)

Michael Kay
http://www.saxonica.com/

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.