th td

Matches <th> and <td> tags and outputs it as <Cell>.

Attribute

Description from HTML to XML

Description from XML to HTML

style

Node without class attribute is matched to CellStyle=""

"anyClassValue" is matched to CellStyle="anyClassValue"

CellStyle="anyStyleValue" is matched to class="anyStyleValue".

default width

Default values attribute, sets ColWidth="5".

The style attribute is a default match attribute and all <td> / <th> tags are changed to <Cell CellStyle="">.

The rest of the Cell attributes are filled dynamically while the table cells are being parsed.

Specific cell attributes:

  • HorStradle – corresponds to the colspan. HorStradle="int value" is parsed from and to colspan="int value + 1".

  • VerStradle – corresponds to rowspan. VerStradle="int value" is parsed from and to rowspan="int value + 1".

    The colspan attribute defines the number of columns a cell should span. In HTML, if a cell (th, td) has colspan="2", it is managed as two merged cells.. In InDesign, the corresponding cell element has the attribute HorStradle="1", and an empty filling cell is inserted after the cell element. This also applies to the rowspan and VerStradle attributes. The general rule is that if a table is 4x4 cells, all the cells need to be present in the InDesign XML table, and empty cells are inserted to fill spanned cells space while transforming the HTML table.

  • ColWidth – the column width corresponds to the cell width and is calculated as the maximum width attribute value for the cells in the specified table column.

    If a cell has colspan value > 1, it is not used for calculating the column width.

    The difference between size interpretation in HTML and XML:

  • HTML – the sizes defined in a cell style are interpreted as the minimum size of a cell.

  • InDesign – the Cell ColWidth is the exact size value and any content exceeding this is not visible with the Row RowMin interpretation depends on the RowHeight attribute. If RowHeight="AtLeast", then RowMin is used as the minimum size value. If RowHeight="Exactly" then RowMin is used as exact size value and any exceeding content is not visible.