Configuring tables

There are standard CSS properties used to indicate what elements are tables, table rows and table cells. What CSS is missing is the possibility to indicate the cell spanning, row separators or the column widths. Oxygen XML Editor Author offers support for adding extensions to solve these problems. This will be presented in the next chapters.

The table in this example is a simple one. The header must be formatted in a different way than the ordinary rows, so it will have a background color.

table{
    display:table;
    border:1px solid navy;
    margin:1em;
    max-width:1000px;
    min-width:150px;
}

table[width]{
  width:attr(width, length);
}

tr, header{
    display:table-row;
}

header{
    background-color: silver;
    color:inherit
}

td{
  display:table-cell;
  border:1px solid navy;
  padding:1em;
}

Because in the schema the td tag has the attributes row_span and column_span that are not automatically recognized by Oxygen XML Editor Author, a Java extension will be implemented which will provide information about the cell spanning. See the section Configuring a Table Cell Span Provider.

The column widths are specified by the attributes width of the elements customcol that are not automatically recognized by Oxygen XML Editor Author. It is necessary to implement a Java extension which will provide information about the column widths. See the section Configuring a Table Column Width Provider.

The table from our example does not make use of the attributes colsep and rowsep (which are automatically recognized) but we still want the rows to be separated by horizontal lines. It is necessary to implement a Java extension which will provide information about the row and column separators. See the section Configuring a Table Cell Row And Column Separator Provider.