Sorting data

The speedata Publisher offers an easy way to sort data. If this method is not sufficient, the sorting must be performed by an external program such as XSLT.

Assuming that the data file (data.xml) looks like this:

  <item value="one"/>
  <item value="two"/>
  <item value="three"/>

Can now be sorted with <SortSequence>. The original data is not changed.


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

In addition to the command <SortSequence> there is also the possibility to sort and group by <MakeIndex>. This command is described in the chapter Sorting of keyword indexes.