[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: number of rows

Subject: RE: number of rows
From: Jarno.Elovirta@xxxxxxxxx
Date: Tue, 2 Dec 2003 11:10:03 +0200
delerium remembrance text
Hi,

> into oe xml i have:
> 
> <nofrows>10</nofrows>
> the nofrows value is variable.
> 
> how can i ade one thing as this using xsl:
> 
> for(i=0;i<nofrows;i++){
> here print <td><xsl:value-of="xxx"/></td>
> }
> 
> how can i print one <td></td> nofrows times.

  <xsl:call-template name="rec"/>

with the recursive template

  <xsl:template name="rec">
    <xsl:param name="i" select="nofrows"/>
    <xsl:if test="$i > 0 ">
      <td>
        <xsl:value-of select="xxx"/>
      </td>
      <xsl:call-template name="rec">
        <xsl:with-param name="i" select="$i - 1"/>
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

Cheers,

Jarno - Delerium: Remembrance

  

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.