Bookmark and Share Share

<select>

This statement selects specific nodes in all repeating children from an input variable and places the result in a variable. This acts as a 'column filter,' selecting specific nodes within all repeating children.

For more information and an example, see <select> Example.

Can Contain ( columns )
Allowed In mashup, else, elseif, for, foreach, if, macro, operation, sequence, while,

Attributes

Name Required Description
inputvariable yes

The name of the input variable to select from.

selectexpr  

An XPath expression that defines the set of repeating nodes in the input variable to use as the source to select from.

outputvariable yes

The required variable to accept the output of this statement.

<columns>

An XPath expression identifying one node to include in the output variable for each repeating item in the results of the select expression.

Can Contain ( column+ )

<column>

An XPath expression identifying one node to include in the output variable for each repeating item in the results of the select expression.

Can Contain String

<select> Example

The variable to be filtered is identified in the inputvariable attribute. You identify the repeating items to filter in the selectexpr attribute with an XPath expression that is relative to the input variable.

The specific nodes to include in the result for this statement are defined as <column> elements inside <columns>. Each <column> element takes an XPath expression, relative to the 'items' from the select expression, to identify a node to include.

Note: because <select> filters an existing set of nodes and does not construct a new XML document, you do not use dynamic mashup expressions to identify the nodes to select.

For example:

<select inputvariable="$feedback" outputvariable="$critical" 
  selectexpr="//response[@urgency='1']"> 
  <columns> 
    <column>respondent</column> 
    <column>company</column> 
    <column>description</column> 
    <column>status</column> 
  </columns> 
</select>

In this example, the output of <select> is a set of <response> nodes from the $feedback variable that have an urgency value of 1. The output only includes the respondent, company, description and status nodes for each <response>.