Env - Counter 

Page / - last modified by Outhman Moustaghfir on 2024/02/20 15:30 

Counter 
last modified by Outhman Moustaghfir
on 2024/02/20 15:30

Table of Contents
Introduction
Parameters
Uses

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 :

Return: The function returns the incremented counter.