Add Functions, Operators, and XSLT Statements

You can add functions, operators, and XSLT statements to your mappings.

Working with Functions

  1. In the Target section, highlight the element node to which to connect.

  2. In the upper right corner, click function icon to launch the Components panel.

  3. Expand Functions.

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

  6. Click Save icon to save your updates.
    Description of jet_mapper_func2.png follows
    Description of the illustration jet_mapper_func2.png

    You can also drag functions onto existing mappings. Assume you have the following simple mapping.
    Description of jet_mapper_func3.png follows
    Description of the illustration jet_mapper_func3.png

  7. 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 jet_mapper_func4.png follows
    Description of the illustration jet_mapper_func4.png

  8. Drag the second source element to the right of the comma.
    Description of jet_mapper_func5.png follows
    Description of the illustration jet_mapper_func5.png

  9. Click Save icon to save the function.

    The concat function is shown as complete.
    Description of jet_mapper_func6.png follows
    Description of the illustration jet_mapper_func6.png

Working with Operators

  1. Expand the Operators section.

  2. 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 jet_mapper_func7.png follows
    Description of the illustration jet_mapper_func7.png
  3. Drag appropriate source elements to both sides of the operator or manually enter values.

  4. Click Save icon to save the operation.

    The operator icon is displayed in the Mapping Canvas.

Working with XSLT Statements

  1. Click Advanced.

    An XSLT header is added to the Components panel.

  2. Expand XSLT.

  3. 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 jet_mapper_xslt_if.png follows
    Description of the illustration jet_mapper_xslt_if.png

    Or drag a for-each statement to a repeatable element.
    Description of jet_mapper_foreach.png follows
    Description of the illustration jet_mapper_foreach.png

Get Help to Use Functions

Online help is provided to use the functions in the mapper.

  1. In the upper right corner, click function icon to launch the Components panel.
  2. Expand Functions.
  3. Select a function. For this example, current-date is selected.
    A message with a link is displayed.
    The Developer, XSLT, View, Filter links and four icons appear in the upper right corner. Below is the Target column and the Components list. Functions is selected. Within Date, the current-date function is selected. In the Target column, a message with a brief description of the function and a Learn More link are displayed.

  4. Click the link. Details about the function are displayed at the https://www.w3.org/TR/xpath-functions site, including a summary, signature, properties to specify, rules, any specific usage notes, and examples.