# Elementname: `SortSequence`

## Description

Sort a list.

Allowed attributes: criterium, removeduplicates, select

Child elements: (none)

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

### Attributes

criterium (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" criterium="value"/>
      </SetVariable>
      <PlaceObject>
        <Textblock>
          <ForAll select="$sorted">
            <Paragraph><Value select="@value"></Value></Paragraph>
          </ForAll>
        </Textblock>
      </PlaceObject>
    </Record>

# Commands

- A
- Action
- AddToList
- AtPageCreation
- AtPageShipout
- Attribute
- B
- Barcode
- Bold
- BoldItalic
- Bookmark
- Box
- Br
- Case
- Circle
- Color
- Column
- Columns
- Contents
- Copy-of
- DefineColor
- DefineFontfamily
- DefineTextformat
- Element
- EmptyLine
- Fontface
- ForAll
- Frame
- Grid
- Group
- HSpace
- Hyphenation
- I
- Image
- Include
- InsertPages
- Italic
- Layout
- Li
- LoadDataset
- LoadFontfile
- Loop
- Makeindex
- Margin
- Mark
- Message
- NewPage
- NextFrame
- NextRow
- NoBreak
- Ol
- Options
- Otherwise
- Output
- Overlay
- PDFOptions
- Pageformat
- Pagetype
- Paragraph
- PlaceObject
- Position
- PositioningArea
- PositioningFrame
- ProcessNode
- Record
- Regular
- Rule
- SaveDataset
- SavePages
- Sequence
- SetGrid
- SetVariable
- SortSequence
- Stylesheet
- Sub
- Sup
- Switch
- Table
- Tablefoot
- Tablehead
- Tablerule
- Td
- Text
- Textblock
- Tr
- Transformation
- U
- URL
- Ul
- Until
- VSpace
- Value
- While

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