xsl-list
[Top] [All Lists]

RE: Selecting Random elements

2003-11-06 06:39:38
look at www.exslt.org random functions....might help or for something with more 
rigor go see Dimitre Novatchev excellent work with FXSL 
http://fxsl.sourceforge.net/articles/Random/Casting%20the%20Dice%20with%20FXSL-htm.htm

gl, Jim Fuller

-----Original Message-----
From: David Elsmore [mailto:delsmore(_at_)brookes(_dot_)ac(_dot_)uk]
Sent: 06 November 2003 12:55
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Selecting Random elements


Hi,

Rather than selecting all elements in a given context, is it possible to 
select a random set of a predifined number. For example given the 
following XML file which could contain hundreds of images, is it 
possible to output a randomly selected set of 3
 
<imglibrary>
<img src="1.jpg"/>
<img src="2.jpg"/>
<img src="3.jpg"/>
etc...
</imglibrary>

The output could be something like:

<img src="53"/>
<img src="74"/>
<img src="81"/>

Thanks in advance for your help

-- 
David Elsmore
IT Development Manager
School of Social Sciences and Law
Oxford Brookes University
Tel: 01865 484176
email: delsmore(_at_)brookes(_dot_)ac(_dot_)uk



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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