MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in EMML | Writing Mashups in EMML | Constructing the Mashup Result, Inputs or Intermediate Variables | <select> | <select> Example
 
<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>.
Working Samples
The following sample mashups use the <select> statement:
*YahooHotJobSelect (select.emml)
See Mashup Samples for a list of MashZone NextGen mashup samples and where to find them.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release