[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sequential numbers in pure xslt, breaking the no-
David Carlisle wrote:
a fourth would be to use doc() to some web server that returned the next That could be done by using the generate-id() function with a dynamic node. But it is not a trivial solution, though it is easier to make it cross-processor.
I would like to, but, I didn't invent the algorithm. The idea was this: make a UUID from within XLST (i.e., portable xslt). The timestamp part of any UUID, is defined as: "the current timestamp, but if multiple UUIDs are requested withing the current granularity, add 1 to each new timestamp to make them unique". It's not my algorithm. And yes, I know, UUID are not the type of thing you would want to create using XSLT. I just took up the challenge and hoped to find something "well enough to suit for everyday use". Another situation where consecutive numbers are useful is in outputting '001, 002, 003, 004' etc at the beginning of each and every xsl:message, making it easy to follow the execution order (and not sure if that can be done in functional style). -- Abel
|
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
|