xsl-list
[Top] [All Lists]

Re: [xsl] How to Do Random "Shuffle"?

2014-09-13 11:38:58

I've recently proposed a family of random number functions for XPath 3.1,
and I included permute() as a primitive on the theory that a native
implementation might be considerably more efficient than a user-written
implementation.


Which, for those that have interest in following it, can be found here, and was 
apparently originally reported/requested by Jakub Maly, with Michael's proposal 
in comment #4: https://www.w3.org/Bugs/Public/show_bug.cgi?id=20573

As the (publicly viewable) comment #4 states, the proposal was added to the 
internal Draft of XPath 3.1. Not much help to you yet, I think, because I 
highly doubt that there is already an implementation available that supports 
this.

As an aside, you may be interested in using FXSL for random numbers, which has  
function (or named template) for this purpose. See for examples: 
http://fxsl.sourceforge.net/articles/Random/Casting%20the%20Dice%20with%20FXSL-htm.htm

Cheers,
Abel
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>