This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: running a for loop (eg.1 to 10) using XSL



> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]