Subject: [xsl] Re: question on random numbers for browser XSLT From: "Vladimir Nesterovsky" <vladimir@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 24 Jul 2009 23:48:33 +0300 |
goodTo Ben: The cache-append idea was my first thought, but I couldn't think of a
$scale,way to pull together how to have each request be unique. It's possible using node-set(), though: ... ... <xsl:choose> <xsl:when test="function-available('exsl:node-set')"> <xsl:value-of select="document(concat('/cgi-bin/rand.pl?',
$scale,'&x=', generate-id(exsl:node-set($seed))))" /> </xsl:when> <xsl:when test="function-available('msxsl:node-set')"> <xsl:value-of select="document(concat('/cgi-bin/rand.pl?',
'&x=', generate-id(msxsl:node-set($seed))))" /> </xsl:when> ...
I tried your solution and after replacing '&x=' with '+' it directly worked on my local web server! (I did not know that generate-id works in a browser)
But as already posted it did not work after installed on my real webserver because that does not have enough power to handle the six document opens.
Btw, I really like the solution of David Carlisle to provide exslt:node-set for IE browsers (and not having to deal with exslt/msxml): http://dpcarlisle.blogspot.com/2007/05/exslt-node-set-function.html
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] question on random number, Hermann Stamm-Wilbra | Thread | Re: [xsl] Re: question on random nu, Ben Mendis |
Re: [xsl] question on random number, Hermann Stamm-Wilbra | Date | Re: [xsl] Re: question on random nu, Ben Mendis |
Month |