This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Repeating something "n" times.
> given a number how do I generate a node set with that many elements?
try this:
<template name="generate-nodes"/>
<param name="node"/>
<param name="times"/>
<if test="times > 0">
<copy-of select="$node"/>
<call-template name="generate-nodes">
<with-param name="node">
<copy-of select="$node"/>
</with-param>
<with-param name="times">
<value-of select="$times - 1"/>
</with-param>
</call-template>
</if>
</template>
Cu,
Goetz.
PGP signature