[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Selecting Random elements

Subject: RE: Selecting Random elements
From: "Jim Fuller" <jim.fuller@xxxxxxxxxxxxxxxxxx>
Date: Thu, 6 Nov 2003 13:39:38 -0000
xsl random
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@xxxxxxxxxxxxx]
Sent: 06 November 2003 12:55
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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@xxxxxxxxxxxxx



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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.