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

RE: randomizing data

Subject: RE: randomizing data
From: "Jacoby, Peter R." <PJACOBY@xxxxxxxxxxxx>
Date: Thu, 20 May 2004 16:14:19 -0400
randomizing data
For randomization in XSLT, you should check out Dimitre Novatchev's excellent
work on FXSL including a whole module for random number generation.

Casting the Dice with FXSL: Random Number Generation Functions in XSLT
http://www.topxml.com/xsl/articles/dice/


-Peter

-----Original Message-----
From: Passin, Tom [mailto:tpassin@xxxxxxxxxxxx] 
Sent: Thursday, May 20, 2004 4:05 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  randomizing data

From: SnHndrc@xxxxxxx [mailto:SnHndrc@xxxxxxx]
 
> Is it possible to grab sections of an xml document
<chapter1><title></title><para></para></chapter1> and randomize it with xslt? 

> Chapter 10 would be first, then 8 then another chapter in random order.

Yes, you could do that.  I have a hack in the forthcoming OReilly book "XML
Hacks" that shows a simple way to randomize with xslt.  Basically, insert a
string of random numbers into a node in the style sheet and index into it to get
the random numbers.  Or you could pass in a different random string as a global
parameter each time you run the stylesheet.

Cheers,

Tom P

Current Thread
  • randomizing data
    • SnHndrc - Thu, 20 May 2004 14:28:59 -0400
      • <Possible follow-ups>
      • Passin, Tom - Thu, 20 May 2004 16:05:25 -0400
      • Jacoby, Peter R. - Thu, 20 May 2004 16:14:19 -0400 <=

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.