|
Subject: Re: [xsl] simple conditional looping From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Mon, 16 Aug 2004 02:01:42 -0700 (PDT) |
Hi Keyur,
You can simulate a loop with recursion..
<xsl:call-template name="iterate">
<xsl:with-param name="x" select="50" />
</xsl:call-template>
<xsl:template name="iterate">
<xsl:param name="x"/>
<xsl:if test="$x > 0">
<tr/>
<xsl:call-template name="iterate">
<xsl:with-param name="x" select="$x - 1" />
</xsl:call-template>
</xsl:if>
</xsl:template>
Regards,
Mukul
--- Keyur K <kkeyur@xxxxxxxxxxx> wrote:
> Hello Members,
>
> I want to write a simple loop statement like
> for($i=1; $i <= 50; $i++) in my
> stylesheet to generate 50 tr (table rows).
>
> I am not sure how I can do this. I tried using
> <xsl:for-each/> but it just
> loops through the nodes. I cannot specifiy any
> conditional test like in
> <xsl:if /> .
>
> How can I achieve this? Pl. advice.
>
> Thanks & Regards,
> Keyur
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] simple conditional looping, Keyur K | Thread | RE: [xsl] simple conditional loopin, Andrew Welch |
| RE: [xsl] Adding Variables, Andrew Welch | Date | AW: [xsl] simple conditional loopin, christof.hoeke |
| Month |