xsl-list
[Top] [All Lists]

Re: [xsl] creating arbitrary document references

2019-05-28 15:55:33
On 28.05.2019 22:38, Graydon graydon(_at_)marost(_dot_)ca 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.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>