Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] RandomList.xsl from FXSL-xslt2

From: Jesper Tverskov <jesper@--------.-->
To: xsl-list@-----.------------.---
Date: 10/2/2009 8:24:00 AM
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent