Subject: Re: [xsl] Randomly displaying articles from RSS feed From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 11 Jan 2008 12:29:08 -0500 |
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.
<feeds> <feed weight="15">Reference A</feed> <feed weight="50">Reference B</feed> <feed weight="20">Reference C</feed> <feed weight="15">Reference D</feed> </feeds>
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Randomly displaying artic, Abel Braaksma | Thread | Re: [xsl] Randomly displaying artic, Andrew Welch |
Re: [xsl] Supressing entity expansi, Jesper Tverskov | Date | Re: [xsl] Randomly displaying artic, Andrew Welch |
Month |