[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Randomly displaying articles from RSS feed

Subject: Re: Randomly displaying articles from RSS feed
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 11 Jan 2008 01:29:45 +0100
Re:  Randomly displaying articles from RSS feed
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.

Cheers,
-- Abel Braaksma

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.