Using a loop in XSL

Subject: Using a loop in XSL
From: Lars-Arne Mattsson <larssa@xxxxxxxxxx>
Date: Fri, 22 Jan 1999 11:39:24 +0100 (MET)
Hello!

I only wonder if there is a way to do something like a for-loop in
XSL? I can't find any apropriate commands in the specification so I
ask here.

The thing I want to do is to use a numeric value (N) given as a
attribute and then generate a line of HTML code N number of times.

-- Simple example --------------------
XML:
<question>
  How many of the tests have you taken?
  <alternatives num="3">
</question>

HTML:
<strong>How many of the tests have you taken?</strong>
<input type="radio" name="answer" value=1>
<input type="radio" name="answer" value=2>
<input type="radio" name="answer" value=3>
--------------------------------------

Is this possible, or do I have to generate XML-code for each of the
alternatives?

Greetings, 
/Larssa


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread