Introduction

Increment the count of a variable during the session based on a specified scenario.

Parameters

  • "Counter Name": Mandatory.
  • "Increment Number": Optional.
  • "Max Number Not to Exceed": Optional.
  • "Initialization Number if Max is Reached": Optional.

Uses


 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ixf="http://www.ixPath.com/Function" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ix="localFunction" xmlns:fn="http://www.w3.org/2005/xpath-functions" >
 <xsl:output method="xml" indent="yes"></xsl:output>
  <!-- Beginning of the Translation -->
  <xsl:template match="/">
   <ixDOC>
   <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST>
   <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST>
   <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST>
   <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST>

   </ixDOC>
  </xsl:template>
</xsl:stylesheet>

for this example the output is :

Capture d'écran 2024-02-20 152646.png

Return: The function returns the incremented counter.

Tags:
    
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian