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

Re: creating arbitrary document references

Subject: Re: creating arbitrary document references
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 May 2019 20:55:28 -0000
Re:  creating arbitrary document references
On 28.05.2019 22:38, Graydon graydon@xxxxxxxxx wrote:

So how can I pick a random member of that sequence of
files-available-to-be-referenced each time the template matches and I
need to replace the value of @href with that arbitrary actual file
reference?

One way to deal with the "recursive" call requirement of the random-number-generator function I have experimented with in XSLT 3 is to use an accumulator with the initial-value="random-number-generator(current-dateTime())" and an accumulator rule for the matching nodes to create new one e.g.

<xsl:accumulator-rule match="xref" select="$value?next()"/>

So perhaps you can adapt to get a new number based on the accumulator
attached random number generator of a matched node.

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.