Wiki source code of IXpathExpression

Last modified by Outhman Moustaghfir on 2024/07/24 12:22

Hide last authors
Outhman Moustaghfir 1.1 1 = Introduction =
2
3 IXpathExpression is a built-in expression language similar to the well-known Xpath language.
4
5
6 = Use =
7
8 * The current usable syntax of IXpathExpression looks like the following :  {{code language="none"}}trkType [ key1 {operator} value1 AND key2 {operator} value2 ...] {{/code}}
9
Outhman Moustaghfir 4.1 10 eg : Product [ Price <10 AND Quantity= 3 AND Category = Food]
Outhman Moustaghfir 1.1 11
12 * The list of available operators : 
13 ** (((
Outhman Moustaghfir 4.1 14 |(% style="width:343px" %) =|(% style="width:412px" %)equals|(% style="width:448px" %)
Outhman Moustaghfir 1.1 15 |(% style="width:343px" %)>=|(% style="width:412px" %)greater or equal than|(% style="width:448px" %)
16 |(% style="width:343px" %)>|(% style="width:412px" %)greater than|(% style="width:448px" %)
17 |(% style="width:343px" %)<=|(% style="width:412px" %)less or equal|(% style="width:448px" %)
18 |(% style="width:343px" %)<|(% style="width:412px" %)less|(% style="width:448px" %)
19 |(% style="width:343px" %)~!=|(% style="width:412px" %)different|(% style="width:448px" %)
Outhman Moustaghfir 3.1 20 |(% style="width:343px" %)<>|(% style="width:412px" %)between two number or date values|(% style="width:448px" %)(((
Outhman Moustaghfir 2.1 21 the two values are stored in a String as : "min;max"
22
Outhman Moustaghfir 3.1 23 Example : Product [ ExpirationDate <> 2020-02-02;2021-02-02
Outhman Moustaghfir 2.1 24 )))
Outhman Moustaghfir 3.1 25 |(% style="width:343px" %)#|(% style="width:412px" %)not in an array of values |(% style="width:448px" %)(((
Outhman Moustaghfir 1.1 26 the list is a String of values separated with ';' :
27
Outhman Moustaghfir 3.1 28 Example : Game [ Alias # FIFA;MINECRAFT ]
Outhman Moustaghfir 1.1 29 )))
Outhman Moustaghfir 3.1 30 |(% style="width:343px" %)€|(% style="width:412px" %)in an array of values|(% style="width:448px" %)(((
Outhman Moustaghfir 1.1 31 |(% style="width:448px" %)(((
32 the list is a String of values separated with ';' :
33
Outhman Moustaghfir 3.1 34 Example : Planet [ Name € Mercury;Earth]
Outhman Moustaghfir 1.1 35 )))
36 )))
37
38
39 )))
Outhman Moustaghfir 5.1 40 * (((
41 **Metadata:**
42 )))
Outhman Moustaghfir 1.1 43
Outhman Moustaghfir 7.1 44 There is the possibility to call values from metadata, such as creationDate , modificationDate, jobID , userID ... by inserting '**_**' (underscore) at the beginning of the alias  needed like : _creationDate , _modificationDate ...
Outhman Moustaghfir 5.1 45
Outhman Moustaghfir 7.1 46 Exemple :
47
48 {{code language="XML"}}
Outhman Moustaghfir 8.1 49 <xsl:value-of select="ixf:GetTracking(Order[_envID = 'iXPath'])"></xsl:value-of>
Outhman Moustaghfir 7.1 50 {{/code}}
51
Outhman Moustaghfir 5.1 52 * (((
53 **Links**
54 )))
55
Outhman Moustaghfir 6.1 56 **~ **To call values from links, insert "**!**" at the beginning of the alias. For example: !key will refer to the linked value associated with the key.
Outhman Moustaghfir 5.1 57
Outhman Moustaghfir 7.1 58 {{code language="XML"}}
Outhman Moustaghfir 8.1 59 <xsl:value-of select="ixf:GetTracking(Order[!Partner.Name = 'My Partner'])"></xsl:value-of>
Outhman Moustaghfir 7.1 60 {{/code}}
61
Outhman Moustaghfir 5.1 62 * **Extrametadata:**
63
Outhman Moustaghfir 6.1 64 To call values from extrametadata, insert "**§**" at the beginning of the alias. For example: §key will refer to the value associated with the key in extrametadata.
Outhman Moustaghfir 5.1 65
Outhman Moustaghfir 7.1 66 {{code language="XML"}}
Outhman Moustaghfir 8.1 67 <xsl:value-of select="ixf:GetTracking(Order[§xTraMetaDataKey = 'Value'])"></xsl:value-of>
Outhman Moustaghfir 7.1 68 {{/code}}
Outhman Moustaghfir 5.1 69
Outhman Moustaghfir 8.1 70 * **Projection:**
71 To project into a certain value you can use :
72 {{code language="XML"}}<xsl:value-of select="ixf:GetTracking(Order[§xTraMetaDataKey = 'Value']/OrderType)"></xsl:value-of>{{/code}}
Outhman Moustaghfir 9.1 73 * (((
74 **Include Keys:**
75 Specifies the keys to be fetched. If it is null or empty, all keys will be fetched. keys are separted by ";" and if we want to fetch keys in subTracking we can use this expression for example '**SubTrk.SubTrkLevel2.subTrkLevel3.key'.** This parameter is optional.
76 {{code language="XML"}}<xsl:value-of select="ixf:GetTracking(Order[§xTraMetaDataKey = 'Value'],'fetchLinks','','','Partner.Name;FetchKey1;FetchKey2')"></xsl:value-of>{{/code}}
77 )))
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian