MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in EMML | Writing Mashups in EMML | Transforming Intermediate Results | <group>
 
<group>
 
<group> Examples
This statement groups repeating nodes by the unique values of a field and optionally performs calculations for each group. You can also filter which repeating nodes are included in each group, if desired. Groups can be nested, allowing any level of detail.
<group> constructs a document with items for each unique group value using literal XML that you define and dynamic expressions to determine content or perform calculations. See Literal XML Structures with Literal or Dynamic Data for more information.
With this statement, you:
1. Define What to Group
2. And construct the result:
*Copy and Sort to Construct the Result
*Include Unique Values in the Result
*Add Calculations to the Result or construct the result solely from calculations
You can also optionally Filter With a Condition to exclude some items from a group or Nest Groups to get multiple levels of sorting and calculations. See also Working Samples for information on sample mashups that use this statement.
Can Contain
( group | literal XML and dynamic expressions that define the resulting output for the group)
Literal XML must be well-formed, starting with a root node. Elements in the structure should use a namespace, so that they are clearly separated from EMML markup.
Allowed In
mashup | catch | else | elseif | for | foreach | if | macro | operation | sequence | try | while
Attributes
Name
Required
Description
by
yes
An XPath expression that defines the set of nodes to be grouped and the field whose unique values define each group. For nested groups, this XPath expression is relative to the XPath expression for the parent group.
having
An XPath expression that defines a criteria to filter the nodes to be included in the group.
outputvariable
yes
The required variable to accept the output of this statement.

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