Add Functions, Operators, and XSLT Statements
You can add functions, operators, and XSLT statements to your mappings.
Working with Functions
-
In the Target section, highlight the element node to which to connect.
-
In the upper right corner, click
to launch the Components panel.
-
Expand Functions.
-
Select a function. For this example, String is expanded and concat is dragged to the target element node. The element can be an existing or ghost (not yet created) element.
A function icon is added to the Mapping Canvas section for the target element node and the function XPath expression is added to the Expression Builder at the bottom of the page. This icon indicates that a function is used in this mapping.Note:
You can also initially drag functions to the Expression Builder and then connect the source element(s) to the function. -
In the Sources section, drag the source element nodes to the function in the Expression Builder. For this example, effectiveStartDate and effectiveEndDate are dragged to the two sides of the comma in the concat( , ) function in the Expression Builder. Do not drag source element nodes to the function icon in the Mapping Canvas section.
-
Click
to save your updates.
Description of the illustration jet_mapper_func2.pngYou can also drag functions onto existing mappings. Assume you have the following simple mapping.
Description of the illustration jet_mapper_func3.png -
Drag a function (for this example, concat) onto the line in the Mapping Canvas that connects the two elements.
This action adds the function to the line and shows the concat function in the Expression Builder. The existing source element mapping is added to the left side of the comma.
Description of the illustration jet_mapper_func4.png -
Drag the second source element to the right of the comma.
Description of the illustration jet_mapper_func5.png -
Click
to save the function.
The concat function is shown as complete.
Description of the illustration jet_mapper_func6.png
Working with Operators
-
Expand the Operators section.
-
Drag an operator to the target element node (for this example, a = is added). The = operator is also added to the Expression Builder. The element node can be a created or ghost element node.
Description of the illustration jet_mapper_func7.png -
Drag appropriate source elements to both sides of the operator or manually enter values.
-
Click
to save the operation.
The operator icon is displayed in the Mapping Canvas.
Working with XSLT Statements
-
Click Advanced.
An XSLT header is added to the Components panel.
-
Expand XSLT.
-
Browse for and drag the appropriate XSLT statement onto the target element node or use the search facility to manually enter and search for the XSLT statement.
Note the following conventions:
-
You can drag statements onto parent or child elements. Note the following conventions about dragging XSLT statements:
-
A green icon is displayed when you drag the XSLT statement to the front or the back of the element.
-
If a green icon is not displayed, you cannot insert as a parent.
-
Drag the statement to the end of the name to insert it as a parent.
-
Drag the statement to the front of the name to insert it as a child.
-
-
You can only drag XSLT statements onto created elements. If the element on which you want to drag the statement is grayed out (is a ghost node), right-click the element and select Create Target Node.
For example, drag an if statement to the target element, then map a source element to the target element.
Description of the illustration jet_mapper_xslt_if.pngOr drag a for-each statement to a repeatable element.
Description of the illustration jet_mapper_foreach.png -