Using the XQuery Expression and XQuery Condition Editors
You use XQuery expressions to create the data content for the message context variables (or part of a message context variable) during the execution of the message flow. You can use the test console directly in the XQuery Expression Editor to test the definition of the expression.
Similarly, you use XQuery conditions to evaluate Boolean conditions in the message flow. You can use the test console directly in the XQuery Condition Editor to test the definition of the condition.
An XQuery can take multiple inputs and returns one output. Each input corresponds to an XQuery unbound variable defined in the XQuery. The value of an XQuery input can be a primitive value (String, integer, date, and so on), an XML document, or a sequence of these types. The output value can be a primitive value (String, integer, date, and so on), an XML document, or a sequence of these types.
Note: |
The test console does not support sequences on input. |
Table 30-8 describes XQuery configuration options.
Table 30-8 Configuring XQuery Testing
Section
|
Description
|
Name
|
The type of expression being tested.
|
Test Console Actions
|
Execute
|
Apply the transformation.
|
Reset
|
Reset the input field(s).
|
Close
|
Cancel the current operation.
|
Variables
|
This section contains one input field for each of the XQuery unbound variables.
|
<param_name> ([] as XML)
|
param_name is the name of the corresponding XQuery unbound variable.
In the test console, a single-line edit box is displayed if the type is a simple type. A multi-line edit box is displayed if the data is XML. A combination input (<param_name> ([] as XML)) is used when the variable is not typed.You must declare the variable type. Select the check box to identify a parameter of type XML.
An XML input can be file-based or text-based. Referencing a file for input takes precedence over textual input. Browse and select the file you want to use in your test.
Input in the test console is rendered based on the type to make it easier to understand the type of data you must enter. The default type is XML.
|
- Access the test console when editing an action in the message flow of a pipeline.
- Configure the test data for the XQuery in the Variables section of the page. For more information, see
Table 30-8.
- Click Execute. The testing page displays the results.
- Once you have completed a test, you can click Back to execute a new test. To execute a new test after making changes to the XQuery, you must close and reopen the test console for the changes to take effect.