Adding Tables to a DITA Topic

You can add a table to a DITA topic. By default, DITA supports two types of tables: If you are using a specialized DITA vocabulary, it may contain specialized versions of these table models.

Since DITA is a structured format, you can only insert a table in places in the structure of a topic where tables are allowed. The Oxygen XML Editor DITA toolbar provides support for entering and editing tables. It also helps to indicate where you are allowed to insert a table or its components by disabling the appropriate buttons.

Figure: The DITA Toolbar

The DITA toolbar showing the insert table button available and the table editing buttons are disabled:

Inserting a DITA Simple Table

  1. To insert a DITA simple table, select the Insert Table action on the DITA toolbar or in the Insert submenu from the contextual menu (or the Table submenu from the DITA menu). The Insert Table dialog box appears.
  2. Select the Simple model.
  3. Select the appropriate options for rows and columns, creating a header, column widths, and framing of cells.
  4. Click Insert. The table is inserted.

Inserting an OASIS Exchange Table Model (CALS) Table

To insert an OASIS Exchange Table, follow the same procedure as above, but choose the CALS model. Additional options for specifying row and column separators and alignment will be enabled.

When you insert a CALS table, you see a link for setting the colspecs (column specifications) of your table. Click the link to open the colspec controls. Although they appear as part of the Author mode, the colspec link and the colspec controls will not appear in your output. They are just there to make it easier to adjust how the columns of your table are formatted.

Editing an Existing Table

You can edit the structure of an existing table using the table buttons on the DITA toolbar (or in the Table submenu of the contextual menu or DITA menu) to add or remove cells, rows, or columns, and to set basic table properties. Additional attributes can be used to fine-tune the formatting of your tables by using the Attributes view (Window > Show View > Attributes). See the DITA documentation for a full explanation of these attributes.

Also, remember that underneath the visual representation, both table models are really just XML, and, if necessary, you can edit the XML directly by switching to Text mode.