...
Some mapping functions require the use of constant values for mapping elements. For this, you need to add the constant node to the Mapping Expression Area. Apart from these Mapping Functions, you can also use inbuilt mapper utility classes and global methods available in the Web Mapper to map the elements. Visit Mapper Utility page to know how to use utility classes.
Anchor | ||||
---|---|---|---|---|
|
The Math mapping function enables you to map elements by performing simple mathematic operations. It comprises of various sub-functions, which are listed in the table below.
...
You can use the required sub-function of Math mapping function to map elements. The process of using the Math function is the same for all its sub-functions.
Anchor | ||||
---|---|---|---|---|
|
The String mapping The String mapping function enables you to map elements by manipulating strings. It comprises of various sub-functions, which are listed in the table below.
...
Anchor | ||||
---|---|---|---|---|
|
The Date mapping The Date mapping function enables you to map elements by generating dates in specific formats. It also returns the current date and the difference between two dates. It comprises of various sub-functions, which are listed in the table below.
...
Anchor | ||||
---|---|---|---|---|
|
The Aggregation function The Aggregation function enables you to map elements by aggregating or counting the values of all nodes in an element. It comprises of various sub-functions, which are listed in the table below.
...
Anchor | ||||
---|---|---|---|---|
|
The Conditional mapping The Conditional mapping function enables you to map elements by building conditional expressions. It comprises of various sub-functions, which are listed in the table below.
...
Anchor | ||||
---|---|---|---|---|
|
...
The Axis function contains a list of advance XSL functions that are used to map elements only when the For Each function is applied on the Target node. It comprises of various sub-functions, which are listed in the table below.
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
Axis
| File Path – XPath | This is a customized mapping function. | FilePath ['C:/correct_file.xml'] XPath {'/employees/employee/Name'} |
Self | Returns the element which is the context node itself. | Self::Employee | |
Child | Returns the element which is the child of the context node. | Child::Name | |
Parent | Returns the element, which is the parent (if any) of the context node. | Parent::Name | |
Following-sibling | This axis contains all the following siblings of the context node. It returns the first occurrence of the element/attribute in the next sibling of the context node. If the context node is an attribute node or namespace node, then this axis is empty. | following-sibling: employee/Name | |
Ancestor | Returns the element which is the ancestor of the context node. This axis always includes the root node, unless the context node is the root node. | Ancestor::Name | |
Ancestor-or-self | This axis contains the context node and the ancestors of the context node. It always includes the root node. It returns the context node or ancestors of the context node. | ancestor-or-self::employees/@val | |
Preceding-sibling | This axis contains all the preceding siblings of the context node. It returns the first occurrence of the element/attribute in the preceding sibling of the context node. If the context node is an attribute node or namespace node, then this axis is empty. | preceding-sibling: employee/Name | |
Descendant | Returns the element which is the descendant of the context node. This axis does not contain attribute nodes. | descendant::Name | |
Descendant-or-self | This axis contains the context node and the descendants of the context node. It returns the context node or descendants of the context node. | descendant-or-self::employees/salary | |
Generate-id | Generates a unique id for the element/attribute specified by the XPath argument. | generate-id (employees/employee/Name) | |
Current | Removes all tags from the specified xml file and returns the data. | current() |
You can use the required sub-function of Axis mapping function to map elements. The process of using the Axis function is the same for all its sub-functions.
Anchor | ||||
---|---|---|---|---|
|
...
The Boolean mapping function enables you to map elements by applying various logical operators in building Boolean expressions. It comprises of various sub-functions, which are listed in the table below.
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
Boolean
| Equal | Returns TRUE the first variable argument is equal to the second variable argument. | (5) = (5)returns true |
Not Equal | Returns TRUE the first variable argument is not equal to the second variable argument. | (5) != (50)returns true | |
Greater Than | Returns TRUE the first variable argument is greater than the second variable argument. | (5)> (3)returns true | |
Less Than | Returns TRUE the first variable argument is less than the second variable argument. | (5) < (8)returns true | |
Greater than Equal | Returns TRUE the first variable argument is greater than or equal to the second variable argument. | (5)>= (5)returns true | |
Less than Equal | Returns TRUE the first variable argument is less than or equal to the second variable argument. | (5) <= (8)returns true | |
Or | Returns TRUE if either of the two variable arguments evaluate to TRUE otherwise FALSE. These variable arguments can only be of Boolean data type. Hence, their value can either be TRUE or FALSE only. | (True) Or (True) returns true | |
And | Returns TRUE if both of the two variable arguments evaluate to TRUE otherwise FALSE. These variable arguments can only be of Boolean data type. Hence, their value can either be TRUE or FALSE only. | (True) And (True) returns true |
A Boolean sub-function is always used in conjunction with a Conditional function.
Anchor | ||||
---|---|---|---|---|
|
...
The Context mapping function enables you to map elements by setting or getting the value of process flow context variables. It comprises of various sub-functions, which are listed in the table below.
Mapping Function | Sub-Functions | Description | Example |
---|---|---|---|
Context | Set-Context | This is a customized mapping function. |
|
| Get-Context | This is a customized mapping function. | get-context ('index', '100') |