The XPath Formula Builder

The XPath formula builder can be used where XPath expressions are allowed, such as when creating transformations on the Input tab of an activity. The XPath formula builder allows you to drag and drop schema elements and XPath functions to create XPath expressions. The schema elements, when dragged into the XPath Formula field, automatically become valid XPath location paths for the desired item. If a function is dragged into the XPath formula window, there are placeholders for each parameter of the function. You can drag and drop schema elements over the parameter placeholders to replace each placeholder.

The following figure illustrates using the XPath formula builder to drag and drop schema elements into function placeholders.

The XPath formula builder

The following table describes the different areas of the XPath formula builder.

XPath formula builder elements

Element

Description

Data tab

Displays the process data schema tree. All elements in this tree are available to drag and drop into the XPath Formula field.

Functions tab

Displays the available XPath functions. These are categorized into groups and each function can be dragged from the function list into the XPath Formula field.

When the function is placed into the XPath formula, placeholders are displayed for the function’s parameters. You can drag and drop schema elements from the Data tab into the function’s placeholders.

The result of evaluating the function is displayed in the "Expression Evaluates To" panel. If there are any errors in the expression, they are listed there as well.

For more information about XPath functions, see the description of the function that is displayed when it is selected in the XPath formula builder.

Constants tab

Displays the constants available for use in XPath expressions. These are categorized into groups and each constant can be dragged from the constants list into the XPath Formula field.

Constants are useful for inserting special characters, such as tabs, symbols, and so on, into XPath formulas. Constants are also defined for commonly used items, such as date formats.

Documentation panel

Describes each selected function. As you click on a function in the Function tab, the documentation panel gives a brief description of the function and one or more examples.

Evaluation Context field

Displays the evaluation context of the expression field that the editor was invoked from. For more information about the evaluation context, see Evaluation Context.

XPath Formula field

Displays the XPath formula you wish to create. You can drag and drop items from the Data tab or the Functions tab to create the formula.

Expression Evaluates To Panel

Displays the result of evaluating the formula shown in the XPath Formula field. If there are errors in the formula, they are displayed here.

The following figure illustrates using the XPath formula builder to create a valid function. The function concatenates the data elements $GetCustomerInformation/Street and $GetCustomerInformation/City and places a space between the two elements.

Creating an XPath formula