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

RandomList.xsl from FXSL-xslt2

Subject: RandomList.xsl from FXSL-xslt2
From: Jesper Tverskov <jesper@xxxxxxxxxxx>
Date: Fri, 2 Oct 2009 10:23:46 +0200
 RandomList.xsl from FXSL-xslt2
Hi List

I'm trying to get RandomList.xsl from FXSL-xslt2 working.

The test file provided by FXSL, testRandomList2.xsl, works well for
shuffling a deck of cards. But the order of the 52 cards is always the
same.

<xsl:stylesheet version="2.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:f="http://fxsl.sf.net/"
 exclude-result-prefixes="f">

 <xsl:import href="../f/randomList.xsl"/>

  <!-- Can be applied on any source xml document (ignored) -->
  <xsl:output omit-xml-declaration="yes" indent="yes"/>

  <xsl:template match="/">
    <list>
	    <xsl:call-template name="randomizeList">
	      <xsl:with-param name="pList" select="1  to 52"/>
	    </xsl:call-template>
    </list>
  </xsl:template>

</xsl:stylesheet>

How can I shuffle a deck of cards many times, getting a new order
almost all the time? I guess I need to change the "Global Randomizing
constants" in random.xsl. But how can this be done in  a way that just
works each time I run the testRandomList2.xsl  example?

Cheers,
Jesper Tverskov

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-2011 All Rights Reserved.