Wiki source code of SetTracking

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

Show last authors
1 = Introduction =
2
3 The main goal of SetTracking is to add a certain tracking inside an XSL file.
4
5 = Use =
6
7 The SetTracking function uses the same logic of XMLToTracking, it requires an XML node as Input in an XSL file. as the following example :
8
9 we have a tracking type named 'MyTrk' which has only one data type named 'Num', the XSL file looks like :
10
11 {{code language="XML"}}
12
13 <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">
14 <xsl:output method="xml" indent="yes"/>
15 <!-- Beginning of the Translation -->
16
17
18
19 <xsl:template match="/">
20 <xsl:variable name= "varrr" >
21
22 <Tracking>
23 <MyTrk>
24 <Num>2023</Num>
25 </MyTrk>
26 <MyTrk>
27 <Num>2024</Num>
28 </MyTrk>
29 </Tracking>
30 </xsl:variable>
31 <iXDOC>
32 <test><xsl:value-of select="ixf:SetTracking($varrr)"/></test>
33 </iXDOC>
34 </xsl:template>
35
36 </xsl:stylesheet>
37 {{/code}}
38
39 The function returns all trkIDs (split by space) added to the database :
40
41 {{code language="XML"}}
42
43 <iXDOC xmlns:ixf="http://www.ixPath.com/Function"
44 xmlns:xs="http://www.w3.org/2001/XMLSchema"
45 xmlns:ix="localFunction">
46 <test>6400ae61de99d20c2ead4cca 6400ae61de99d20c2ead4ccb </test>
47 </iXDOC>
48
49 {{/code}}
50
51
52
53
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian