Posted By

dammark on 02/01/12


Tagged

xslt


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

wastemobile


Increment value in XSLT


 / Published in: XSLT
 

URL: xslt-increment

When you want to increment a value in XSLT, this is an option.

  1. <xsl:template name="sections">
  2. <xsl:param name="i" select="1" />
  3. <xsl:param name="boundary" select="11" />
  4.  
  5. <xsl:value-of select="$i" />
  6.  
  7. <xsl:if test="$i &lt; $boundary">
  8. <xsl:call-template name="sections">
  9. <xsl:with-param name="i" select="$i + 1" />
  10. </xsl:call-template>
  11. </xsl:if>
  12. </xsl:template>

Report this snippet  

You need to login to post a comment.