Edit online

Sorting Content in Tables and List Items

Oxygen XML Author Eclipse plugin offers support for sorting the content of tables and list items of ordered and unordered lists.

Edit online

Sorting a Table

To sort rows in a table, select the entire table (or specific rows) and use the Sort action from the main toolbar or the contextual menu. This opens the Sort dialog box.

Figure 1. Sort Dialog Box

This dialog box sets the range that is sorted and the sorting criteria. The range is automatically selected depending on whether you sort an entire table or only a selection of its rows.

Note: When you invoke the sorting operation over an entire table, the Selected rows option is disabled.
The Criteria section specifies the sorting criteria (a maximum of three sorting criteria are available), defined by the following:
  • A name, which is collected from the column heading.
  • The type of the information that is sorted. You can choose between the following:
    • Text - Alphanumeric characters.
    • Numeric - Regular integer or floating point numbers are accepted.
    • Date - Default date and time formats from the local OS are accepted (such as short, medium, long, full, xs:date, and xs:dateTime).
  • The sorting direction (either ascending or descending).

The sort criteria is automatically set to the column where the cursor is located at the time when the sorting operation is invoked.

After you finish configuring the options in the Sort dialog box, click OK to complete the sorting operation. If you want to revert to the initial order of your content, press Ctrl + Z (Command + Z on macOS) on your keyboard.
Note: The sorting support takes the value of the @xml:lang attribute into account and sorts the content in a natural order.
Edit online

Sorting a Selection of Rows

To sort a selection of rows in a table, select the rows that you want to sort and either right-click the selection and choose Sort, or click Sort on the main toolbar. This opens the Sort dialog box.

Figure 2. Sort Selected Rows

This dialog box sets the range that is sorted and the sorting criteria. The range is automatically selected depending on whether you sort an entire table or only a selection of its rows.

The Sort dialog box also allows you to apply the sorting operation to the entire table, using the All rows option.

The Criteria section specifies the sorting criteria (a maximum of three sorting criteria are available), defined by the following:
  • A name, which is collected from the column heading.
  • The type of the information that is sorted. You can choose between the following:
    • Text - Alphanumeric characters.
    • Numeric - Regular integer or floating point numbers are accepted.
    • Date - Default date and time formats from the local OS are accepted (such as short, medium, long, full, xs:date, and xs:dateTime).
  • The sorting direction (either ascending or descending).

The sort criteria is automatically set to the column where the cursor is located at the time when the sorting operation is invoked.

After you finish configuring the options in the Sort dialog box, click OK to complete the sorting operation. If you want to revert to the initial order of your content, press Ctrl + Z (Command + Z on macOS) on your keyboard.
Note: The sorting support takes the value of the @xml:lang attribute into account and sorts the content in a natural order.

Sort Using Multiple Criteria

You can also sort an entire table or a selection of its rows based on multiple sorting criteria. To do so, select the rest of boxes in the Criteria section of the Sort dialog box, configure the applicable items, and click OK to complete the sorting operation.

Figure 3. Sorting Based on Multiple Criteria
Edit online

Sorting a Table that Contains Merged Cells

If a table contains cells that span over multiple rows, you can not perform the sorting operation over the entire table. Still, the sorting mechanism works over a selection of rows that do not contain rowspans.
Note: For this type of table, the Sort dialog box keeps the All rows option disabled even if you perform the sorting operation over a selection of rows.
Edit online

Sorting List Items

A sorting operation can be performed on various types of lists and list items. The types of lists that can be sorted in Oxygen XML Author Eclipse plugin depend on the framework (document type), but examples of the types that can be sorted include:
  • Ordered list (DITA, DocBook, XHTML, TEI)
  • Unordered list (DITA, DocBook, XHTML, TEI)
  • Definition list (DITA)
  • Variable list (DocBook)
  • Parameter list (DITA)
  • Simple list (DITA)
  • Required conditions (DITA Machinery Task)
  • Supplies list (DITA Machinery Task)
  • Spare parts list (DITA Machinery Task)
  • Safety conditions (DITA Machinery Task)

The sorting mechanism works on an entire list or on a selection of list items. To sort items in a list, select the items or list and use the Sort action from the main toolbar or the contextual menu. This opens the Sort dialog box.

Figure 4. Sorting List Items

This dialog box sets the range that is sorted and the sorting criteria. The range is automatically selected depending on whether you sort an entire list or only a selection of its items.

Note: When you invoke the sorting operation over an entire list, the Selected rows option is disabled.
The Criteria section specifies the sorting criteria, defined by the following:
  • The name of the type of item being sorted.
  • The type of the information that is sorted. You can choose between the following:
    • Text - Alphanumeric characters.
    • Numeric - Regular integer or floating point numbers are accepted.
    • Date - Default date and time formats from the local OS are accepted (such as short, medium, long, full, xs:date, and xs:dateTime).
  • The sorting direction (either ascending or descending).
After you finish configuring the options in the Sort dialog box, click OK to complete the sorting operation. If you want to revert to the initial order of your content, press Ctrl + Z (Command + Z on macOS) on your keyboard.
Note: The sorting support takes the value of the @xml:lang attribute into account and sorts the content in a natural order.