[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: question on random numbers for browser XSLT
If you have decided to go with a service providing random numbers then
xslt-ish way (set based) to do it would be a service receiving a number and
returning an xml with a specified number of random numbers.
-- Vladimir Nesterovsky http://www.nesterovsky-bros.com/ 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> ...
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|