About Arbortext Styler > Styling Custom Tables > Reordering Columns in Custom Tables
Reordering Columns in Custom Tables
This topic describes how to reorder the columns in the body of a custom table. The example assumes the use of a PartList element, which has the following content model:
<!ELEMENT PartList (Part+)>
<!ELEMENT Part (Number, Description, Weight, Height, Width)>
Example: Reorder the columns in a custom table
Using this example you will style the PartList element as a custom table, and create the custom column order Number, Weight, Description for the table in output. Note that this column order differs from the order of the cell elements in the content model.
1. In your source document, add a PartList element. Create child elements Number, Description, and Weight. Give the elements some content.
2. Open your stylesheet for edit.
3. In the Elements list The Elements list icon - the yellow element icon, assign the Custom Table style to the PartList element.
The Custom Tables list opens, with a new Custom Table object PartList highlighted in the list. Note that the PartList element has been assigned the role of Table role in the Elements category.
The custom table object is crossed out. It is not valid until you have defined a row element.
4. Add Part to the Custom table elements list. Assign it the role of Row.
5. Add Number to the Custom table elements list. Assign it the role of Cell.
6. Repeat the previous step for Weight and Description.
7. Go to the Cells category. Note that the Document order radio button is checked in the Cell order field. Cells will appear in the table in the order they occur in the source document.
8. Click the Specified radio button. Note that the Number, Weight, and Description elements appear in the Cell order list, in the order in which you added them to the custom table model.
9. Use the up arrow button to move the Description element above the Weight element in the list.
10. Choose Preview > Print. You will see that the PartList element is now displayed as a table. It contains the columns Number, Description, Weight in that order.
11. Back in the Custom Tables list, go back to the Cells category. Click the Document Order radio button
12. Preview the document for print again. Note that the columns are displayed in the order in which the cells occur in the source document, i.e. Number, Weight, Description.
Support for reordering of columns in custom tables
The table below shows support for table cell reordering in available output formats with a .style stylesheet.
Editor view
Cells are always shown in document order
Print / PDF via APP
Print / PDF via FOSI
Print / PDF via XSL-FO
All HTML outputs
Column reordering is not supported in any format of stylesheet or template exported from Arbortext Styler.