Subject: [xsl] Re: Selecting a random node from source-tree From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Thu, 26 Sep 2002 08:11:43 -0700 (PDT) |
"Martin Lormes" <martin dot lormes at gmx dot net> wrote: > In XSLT 1.0 > How do I select a random node from the source-tree or from an external > document? > 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. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Generic functions over a tree, Dimitre Novatchev | Thread | Re: [xsl] Re: Selecting a random no, Martin Lormes |
[xsl] Generic functions over a tree, Dimitre Novatchev | Date | Re[2]: [xsl] binary-or, Rubén |
Month |