Group
Provides several options that allows you to organize a list of source entities into groups. The groups are created based on common values of a grouping key or on a pattern that specifies the start of a new group.
Note that you can use this operation in combination with a Filter operation to restrict the source elements that you want to group.
If the option Group By is selected, the groups will be created based on the selected Key attribute. If your grouping-key is more complex you can select the option Custom Key and write a custom XPath expression.
The option Starting with allows you to write an XPath expression that specifies the start of a new group. The Start with expression can be an attribute or entity from your source list. From that point, every item goes into the new group until another element that match the condition is found. For example, if your source file would contain HTML where h1
describe the name of a book chapter and the following p
elements describe a summary of the chapter. You could use this operation to start a new group for each h1
that is found and add them inside a chapter
element. Example of the output of such an XML structure:
<chapters>
<chapter>
<h1>Chapt1 </h1>
<p>summary 1 </p>
</chapter>
<chapter>
<h1>Chapt2 </h1>
<p>summary 2 </p>
</chapter>
</chapters>
Finally, the option Use current group allows you to use the output of the current group in a list to list mapping. This is handy when you want to iterate through each item in the current group.
Provides several options that allows you to organize a list of source entities into groups. The groups are created based on common values of a grouping key or on a pattern that specifies the start of a new group.
Provides several options that allows you to organize a list of source entities into groups. The groups are created based on common values of a grouping key or on a pattern that specifies the start of a new group.
Note that you can use this operation in combination with a Filter operation to restrict the source elements that you want to group.
If the option Group By is selected, the groups will be created based on the selected Key attribute. If your grouping-key is more complex you can select the option Custom Key and write a custom XPath expression.
The option Starting with allows you to write an XPath expression that specifies the start of a new group. The Start with expression can be an attribute or entity from your source list. From that point, every item goes into the new group until another element that match the condition is found. For example, if your source file would contain HTML where h1
describe the name of a book chapter and the following p
elements describe a summary of the chapter. You could use this operation to start a new group for each h1
that is found and add them inside a chapter
element. Example of the output of such an XML structure:
<chapters>
<chapter>
<h1>Chapt1 </h1>
<p>summary 1 </p>
</chapter>
<chapter>
<h1>Chapt2 </h1>
<p>summary 2 </p>
</chapter>
</chapters>
Finally, the option Use current group allows you to use the output of the current group in a list to list mapping. This is handy when you want to iterate through each item in the current group.