© Copyright Excosoft. Powered by Skribenta CCMS® and Topic Finder CDP®

Find and navigate

Filters


Add/remove/view favorites


Table of contents

File properties

Sorting content when publishing

Background

The procedure in this topic assumes Skribenta is installed and configured for normal operation, and:

For example, you need to create a glossary, that is written alphabetically in Swedish but becomes non-sorted after translation. By automatically sorting it during publication, the glossary becomes sorted no matter which language it is translated to.

It is possible to mark content in Skribenta to automatically sort it, for example a list, in the final published publication. This is particular useful after translation. For example a glossary, that is written alphabetically in Swedish, becomes non-sorted after translation. By automatically sorting it during publication, the glossary becomes sorted no matter which language it is translated to.

The sorting comparison is performed at text-level, i.e. it is the content in a paragraph that is compared. At the comparison, the text is divided into text parts and numeral parts. The text parts are compared alphabetically while the numerical parts are compared numerically. The text string "V: 7 kg" is therefore less than "V: 51 kg" because the numerical value 7 is less than 51 in spite of 7 is bigger than 5 (according to the code for the number). The text string "V: 7 kg" is bigger than "v: 51 kg" because 'V' is bigger than 'v'. The comparison starts from the left and continues until some part differs.

Tables are sorted by the first column. If two rows have the same content in the first column, the content of the second column is compared, and so on. For a table to be sorted, no cell is allowed to be spanned with another cell.

About this task

This instruction tells you how to sort content, in for example a table, automatically.

This is the content and published output before sorting a table:

Content

Published output

This is the content and published output after sorting a table:

Content

Published output

In the shown images, the XML tags are visible. To show XML tags, see Turning XML element tags on or off.

Open the file, then set a type attribute with value Sorted on an element, for example a table element or a list element.

Less than 1 minute

Procedure

In the shown images, the XML tags are visible. To show XML tags, see Turning XML element tags on or off.

1. Make sure that the step(s) in section "Starting point" (see section "Background" above) are performed.

A pop-up list opens.

A toolbar opens.

The Type tab opens.

The Type list opens.

If Sorted is not available in the Type list, type Sorted in the Type box.

The attribute type with value Sorted is set on the element.

Sorting is done alphabetically and numerically.

Tables are sorted by the first column. If two rows have the same content in the first column, the content of the second column is compared, and so on. For a table to be sorted, no cell is allowed to be spanned with another cell.