Changes for page Counter
Last modified by Outhman Moustaghfir on 2024/02/26 17:12
edited by Outhman Moustaghfir
on 2024/02/20 15:27
on 2024/02/20 15:27
edited by Outhman Moustaghfir
on 2024/02/20 15:30
on 2024/02/20 15:30
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +Counter - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +iXPath V3.Funcitons.Env.WebHome - Content
-
... ... @@ -1,0 +1,37 @@ 1 += Introduction = 2 + 3 + 4 +Tabulate the count of a variable's occurrences in a given scenario. 5 + 6 += Parameters = 7 + 8 +* **"Counter Name":** Mandatory. 9 +* **"Increment Number":** Optional. 10 +* **"Max Number Not to Exceed":** Optional. 11 +* **"Initialization Number if Max is Reached":** Optional. 12 + 13 += Uses = 14 + 15 + 16 +{{code language="XML"}} 17 + 18 + <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" > 19 + <xsl:output method="xml" indent="yes"></xsl:output> 20 + <!-- Beginning of the Translation --> 21 + <xsl:template match="/"> 22 + <ixDOC> 23 + <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST> 24 + <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST> 25 + <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST> 26 + <TEST><xsl:value-of select="ixf:Counter('counterName')"></xsl:value-of></TEST> 27 + 28 + </ixDOC> 29 + </xsl:template> 30 +</xsl:stylesheet> 31 +{{/code}} 32 + 33 +for this example the output is : 34 + 35 +[[image:Capture d'écran 2024-02-20 152646.png]] 36 + 37 +Return: The function returns the incremented counter.