|
Subject: Re: [xsl] Re: Selecting a random node from source-tree From: "Martin Lormes" <martin.lormes@xxxxxxx> Date: Thu, 26 Sep 2002 18:12:07 +0200 |
----- Original Message -----
From: "Dimitre Novatchev" dnovatchev at yahoo dot com
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, September 26, 2002 5:11 PM
Subject: [xsl] Re: Selecting a random node from source-tree
> > I was thinking of an XPath expression like this:
> >
> > document('funnies.xml')/funnies/quote[random()]
> >
> > Can I avoid using extension elements?
>
> Yes, use the "randNext" template from FXSL.
>
> More information is contained in the article:
>
> "Casting the Dice with FXSL: Random Number Generation Functions in
> XSLT"
>
> http://fxsl.sourceforge.net
> /articles/Random/Casting%20the%20Dice%20with%20FXSL-htm.htm
>
> Hope this helped.
Thanks, Dimitre. Awsome article!
Unfortunately I always get the same random number (which makes perfect
sense, since I can't dynamically generate a starting number :-( )
So I must add this as a condition to my original question: the stylesheet is
static. No way of changing that.
Thanks for your help.
Martin Lormes
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Re: Selecting a random node f, Dimitre Novatchev | Thread | [xsl] Re: Re: Selecting a random no, Dimitre Novatchev |
| Re: [xsl] binary-or, Rubén | Date | Re: [xsl] Repeated Recursion on dif, Peter Doggett |
| Month |