iXPath V3 - IXpathExpression

Page / - last modified by Outhman Moustaghfir on 2023/05/23 15:10

IXpathExpression

last modified by Outhman Moustaghfir

on 2023/05/23 15:10

Table of Contents

Introduction

Use

Introduction

IXpathExpression is a built-in expression language similar to the well-known Xpath language.

Use

The current usable syntax of IXpathExpression looks like the following : trkType [ key1 {operator} value1 AND key2 {operator} value2 ...]

eg : Product [ Price <10 AND Quantity= 3 AND Category = Food]

The list of available operators :

=	equals
>=	greater or equal than
>	greater than
<=	less or equal
<	less
!=	different
<>	between two number or date values	the two values are stored in a String as : "min;max" Example : Product [ ExpirationDate <> 2020-02-02;2021-02-02
#	not in an array of values	the list is a String of values separated with ';' : Example : Game [ Alias # FIFA;MINECRAFT ]
€	in an array of values	the list is a String of values separated with ';' : Example : Planet [ Name € Mercury;Earth]

Metadata:

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 ...

Exemple :

<xsl:value-of select="ixf:GetTracking(Order[_envID = 'iXPath'])"></xsl:value-of>

Links

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.

<xsl:value-of select="ixf:GetTracking(Order[!Partner.Name = 'My Partner'])"></xsl:value-of>

Extrametadata:

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.

<xsl:value-of select="ixf:GetTracking(Order[§xTraMetaDataKey = 'Value'])"></xsl:value-of>

Projection:
To project into a certain value you can use :
<xsl:value-of select="ixf:GetTracking(Order[§xTraMetaDataKey = 'Value']/OrderType)"></xsl:value-of>

Include Keys:
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.
<xsl:value-of select="ixf:GetTracking(Order[§xTraMetaDataKey = 'Value'],'fetchLinks','','','Partner.Name;FetchKey1;FetchKey2')"></xsl:value-of>