Re: [xsl] Randomly displaying articles from RSS feed

Subject: Re: [xsl] Randomly displaying articles from RSS feed
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 11 Jan 2008 14:46:17 -0500
At 12:41 PM 1/11/2008, Andrew wrote:
On 11/01/2008, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
> Cool. I don't think the newly created node ID will work for the use
> case, but the external URL call is excellent (and part of a trend,
> ain't it). Of course, the URL will have to return a number random
> across calls, not just the same "random" number each time. :-)

I think Abel was implying that you would need to append a timestamp to
the query string to make it a unique url per request, ensuring a new
number would be returned each time (avoiding the rules of the doc()
function and perhaps caching along the way)

Indeed, but it's not just the URL that needs to be unique per request, it's the random number returned. (Actually, not unique per request, but rather, random per request.)


I know that's obvious :->, but once a long age ago when the world was very young, I was quite intrigued by how I could get a "random number generator" to return the same series of numbers over and over. Of course, while I suppose that these days the topic is covered in CS 101, I can also imagine someone as naive as I once was putting up a random number generator that fails this simple test.

Off topic for XSLT but not for the thread: http://www.lavarnd.org/ (or if the site is down, which it appears to be, search for "Lava lamp random").

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

Current Thread