<filter>
This statement filters the content of a variable based on a condition and places the result in a new variable. You can also simply update the input variable with filtered results.
This returns a document with only those nodes in the input variable that match the condition. If no nodes match, the result is an empty document, typically just the root node.
The filter condition is defined in an XPath expression. You can use comparisons, position, XPath functions and dynamic expressions in the condition. You can also combine multiple conditions.
Note: | You can also filter directly from the <invoke> statement. |
Can Contain | Empty |
Allowed In | mashup | catch | else | elseif | for | foreach | if | macro | operation | sequence | try | while |
Attributes
Name | Required | Description |
inputvariable | yes | The name of the input variable to filter. |
filterexpr | yes | An expression that defines the filter to apply to the input variable. All matching nodes are included in the result. |
outputvariable | yes | The required variable to accept the output of this statement. |