Elementname: SortSequence

Description

Sort a list.

Allowed attributes: criterion, removeduplicates, select

Child elements: (none)

Parent elements: AtPageCreation, AtPageShipout, Case, Contents, ForAll, Loop, Otherwise, Record, SaveDataset, SavePages, SetVariable, Until, While

Attributes

criterion (text)

Name of the attribute that is used as the sort key.

removeduplicates (text, optional)

If this attribute is used then it contains the name of the data-attribute that gets evaluated when duplicates are eliminated.

select (XPath Expression)

The data that should be sorted.

Example

Data:

<data>
  <elt value="one"/>
  <elt value="two"/>
  <elt value="three"/>
</data>

Layout:

<Record element="data">
  <SetVariable variable="unsorted" select="*"/>
  <SetVariable variable="sorted">
    <SortSequence select="$unsorted" criterion="value"/>
  </SetVariable>
  <PlaceObject>
    <Textblock>
      <ForAll select="$sorted">
        <Paragraph><Value select="@value"></Value></Paragraph>
      </ForAll>
    </Textblock>
  </PlaceObject>
</Record>

Commands

Version: 3.1.18 | Start page | Command reference | Other language: German