tracking - SetTracking 

Page / - last modified by Outhman Moustaghfir on 2024/02/26 17:12 

SetTracking 
last modified by Outhman Moustaghfir
on 2024/02/26 17:12

Table of Contents
Introduction
Use

Introduction
The main goal of SetTracking is to add a certain tracking inside an XSL file.
Use
The SetTracking function uses the same logic of XMLToTracking, it requires an XML node as Input in an XSL file. as the following example : 
we have a tracking type named 'MyTrk' which has only one data type named 'Num', the XSL file looks like :

<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">
<xsl:output method="xml" indent="yes"/>
<!-- Beginning of the Translation -->

<xsl:template match="/">
<xsl:variable name= "varrr"  >
 
  <Tracking>
   <MyTrk>
    <Num>2023</Num>
     </MyTrk>
   <MyTrk>
    <Num>2024</Num>
     </MyTrk>
  </Tracking>
  </xsl:variable>
 <iXDOC>
  <test><xsl:value-of select="ixf:SetTracking($varrr)"/></test>
 </iXDOC>
</xsl:template>

</xsl:stylesheet>
The function returns all trkIDs (split by space) added to the database :

<iXDOC xmlns:ixf="http://www.ixPath.com/Function"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:ix="localFunction">
  <test>6400ae61de99d20c2ead4cca 6400ae61de99d20c2ead4ccb </test>
</iXDOC>