[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|