I want to repeat the following lines in an XML document n times, n being set in the variable $n
The template shall return the CDATA string n x 2 times for i = 0 to n.
Well, that's fairly trivial:
Or, if you prefer: