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: number question


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

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