Re: [xsl] creating arbitrary document references

Subject: Re: [xsl] creating arbitrary document references
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 May 2019 20:55:28 -0000
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

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