This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: running a for loop (eg.1 to 10) using XSL
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: running a for loop (eg.1 to 10) using XSL
- From: "Krishnamurthy, Rama" <RKrishnamurthy at PRAC dot com>
- Date: Wed, 30 Aug 2000 12:40:10 -0400
- Reply-To: xsl-list at mulberrytech dot com
> you haven't declared $currentnum to be a parameter of your template,
> the first line should be
> <transform:param name="currentnum"/>
>
Here it is again.....
<transform:template name="recur">
<transform:param name="currentnum">1</transform:param>
<transform:if test="not($currentnum = 10)">
<transform:value-of select="$currentnum"/>
<transform:call-templates name="recur">
<transform:with-param name="currentnum">
<transform:value-of
select="$currentnum + 1"/>
</transform:with-param>
</transform:call-templates>
</transform:if>
</transform:template>
Still not working.... The value '1' get displayed by the line
<transform:param name="currentnum">1</transform:param>
and not by
<transform:value-of select="$currentnum"/>
What should I do?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list