Re: [xsl] Randomly displaying articles from RSS feed

Subject: Re: [xsl] Randomly displaying articles from RSS feed
From: Abel Braaksma <>
Date: Fri, 11 Jan 2008 01:29:45 +0100
Wendell Piez wrote:

* other possibilities I may be neglecting

Which of these is best will depend on externals, such as which processor you're using, whether an extension function or (say) FXSL is more feasible for you, and so forth.

A quite processor-neutral approach is to use a URL that creates your random number on each request (for multiple requests, make sure the url is unique by using the query part of it, otherwise the processor will not do a second request to the same url as the specs require to requests to the same url to be stable).

Another approach with XSLT 2.0 is to use a newly create node (a function can create a node each time again) and use the generate-id of it. This will not provide randomness, but does provide uniqueness within one process.

-- Abel Braaksma

Current Thread