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

RE: A little Divinitation with generate-id()?

Subject: RE: A little Divinitation with generate-id()?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 12 May 2000 09:58:55 +0100
RE: A little Divinitation with generate-id()?
> Assuming I have 8 possible outcomes, I would want to randomly 
> call one of them 
> 
> Of course, I suppose, generate-id() is the ideal way to go, 

Absolutely not. There is no guarantee at all that the identifiers generated
by generate-id() have any useful randomness propoerties. For example, they
could all end in "0" - it's entirely up to the implementer. In Saxon, id's
ending in "1" are much more likely than any other value.

If you don't care about good randomness, you could use "string-length(/) mod
8", but really I think you need an external function here.

Mike Kay


 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.