Some document languages (i.e. XML) while displayed as table layout model might not have all the elements available immediately. To compensate for these cases these elements must be assumed in the table model in order for it to work.

Missing elements that are automatically generated upon the table rendering, consist of at least three nested objects corresponding to a table-inline element, a table-row and a table-cell.

These anonymous elements are generated through these stages:

  1. Irrelevant boxes are removed:
    1. All child boxes of a table-column parent are treated as they have display set to none.
    2. If a child of a table-column-group parent is not a table-column box, it is treated as it has display set to none.
    3. If a child of a tabular container (table row box or parent) is an anonymous inline box that contains only white space, it is immediately preceding and following siblings (if any) and table descendants are either table-caption or internal table boxes, it is treated as it has display set to none.
    4. If a box is an anonymous inline box that contains only white space, and is between two immediate siblings (if any) each of which is either a table-caption or an internal table box, it is treated as it has display set to none.
  2. Missing child wrappers are generated:
    1. If a child of a table or inline-table box is not a proper table child, then an anonymous table-row box will be generated around the child and all consecutive siblings of the child that are not proper table children.
    2. If a child of a row group box is not a table-row box, then an anonymous table-row box will be generated around the child and all consecutive siblings of the child that are not table-row boxes.
    3. If a child of a table-row box is not a table-cell, then an anonymous table-cell box will be generated around and all consecutive siblings of the child that are not table-cell boxes.
  3. Missing parents are generated:
    1. For each table-cell box child in a sequence of consecutive internal table and table-caption siblings, if the child's parent is not a table-row, then an anonymous table-row box will be generated around the child and all consecutive siblings of the child that are table-cell boxes.
    2. For each proper table child in a sequence of consecutive proper table children, if the child is mis-parented, then an anonymous table or inline-table box will be generated around the child and all consecutive siblings of the child that are proper table children. A table row is mis-parented if its parent is neither a row group box nor a table or inline-table; a table-column box is mis-parented if its parent is neither a table-column-group box nor a table or inline-table; a row group box, table-column-group or table-caption is mis-parented if its parent is neither a table box nor an inline-table box.

 

›› go to examples ››