|
Subject: Re: AW: [xsl] For loop From: Devan Govender <Devan.Govender@xxxxxxxxxxxxxxxxxxx> Date: Thu, 12 Jul 2001 14:00:57 +0200 |
Is it possible to do the following :
<xsl:for-each select="EMPLOYEE_NO">
<tr>
<td WIDTH="62"><font face="Verdana" size="1"> <xsl:value-of
select="."/> </font></td>
<td WIDTH="89"><font face="Verdana" size="1"> <xsl:value-of
select="CONTRACT"/> </font></td>
<td WIDTH="191"><font face="Verdana" size="1" align="CENTER">
<xsl:value-of select="MEMBER_NAME"/> </font></td>
</tr>
<xsl:variable name="temp">
<xsl:value-of select="$counting+1"/>
</xsl:variable>
<xsl:if test="$temp = 10">
<xsl:call-template name="BILLING_TEMP2">
<xsl:with-param name="counting" select="$temp"/>
<xsl:with-param name="counter2" select="$temp2"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
<xsl:template name="BILLING_TEMP2">
<xsl:param name="counting"/>
<xsl:param name="counter2"/>
<xsl:if test="$counting < $counter2">
<xsl:call-template name="BILLING_TEMP">
<xsl:with-param name="counter" select="1"/>
<xsl:with-param name="counting" select="$counting + 1"/>
</xsl:call-template>
</xsl:template>
to simulate a for loop ???
Michael Schafer wrote:
>
> Devan,
>
> there isn't a break or continue statement. The condition IS in the
> pattern in the select attribute of the <xsl:for-each..> Element. The
> pattern defines a nodeset and the loop will be processed for all nodes
> in this set.
>
> So what you have to do is to define a suitable pattern.
>
> Michael.
>
> -----Ursprungliche Nachricht-----
> Von: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]Im Auftrag von Devan
> Govender
> Gesendet: Donnerstag, 12. Juli 2001 13:34
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: Re: [xsl] For loop
>
> I have read about the for-each construct.
> What I need though is a way of looping and stopping the loop under
> a certain condition
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
"I count religion but a childish toy, and hold there is no sin but
ignorance." -Christopher Marlowe, 1592
"HEAVEN does'nt want me & HELL is afraid I'll take over"
DEVAN GOVENDER
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| AW: [xsl] For loop, Michael Schafer | Thread | [xsl] Variables, Devan Govender |
| Re: [xsl] Grouping repeating elemen, Trevor Nash | Date | Re: [xsl] xsl --> pdf with fop (err, Johannes Döbler |
| Month |