This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: number question
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: number question
- From: "Selva, Francis" <Francis dot Selva at purchasepro dot com>
- Date: Fri, 12 May 2000 10:03:38 -0700
- Reply-To: xsl-list at mulberrytech dot com
This is one way of achieving ur result.
<xsl:template match="/">
<xsl:for-each select="//form">
<xsl:variable name="formPosition">
<xsl:number value="position()"/>
</xsl:variable>
<tr>
<td><xsl:value-of select="./@orgcode"/> - <xsl:value-of
select="$formPosition"/></td>
</tr>
</xsl:for-each>
</xsl:template>
or you can use like this
<xsl:template match="/">
<xsl:apply-templates select="//form"/>
</xsl:template>
<xsl:template match="//form">
<xsl:variable name="formPosition">
<xsl:number value="position()"/>
</xsl:variable>
<tr>
<td><xsl:value-of select="./@orgcode"/> - <xsl:value-of
select="$formPosition"/></td>
</tr>
</xsl:template>
Francis
> This could be a usefull feature but I want the numbers
> 1,2,3$4 returned.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list