Nested tables

Simple tables can be inserted within a cell of an existing table to create complex nested tables. However, you should not use such complex tables.

DITA supports nested tables (table and simpletable) through a small workaround. While the DITA content model does not allow a table cell (entry element) to include a table element, it does allow a p element. And a p element can contain a table.

A table can therefore be nested within a table cell provided a paragraph is first added. This results in the following structure:
<table>
 <tbody>
  <row>
   <entry>
     <p><table>....</table></p>
   </entry>
  ...
  </row>
 </tbody>
</table>

In the interests of simplicity, you should not use nested tables. Complex tables can often be avoided by chunking the information into smaller units.

If the type of information is such that nested tables are absolutely necessary, you should only include simple tables (simpletable) within other tables. In other words, you should use a simpletable within a (normal) table, or a simpletable within a simpletable, but not a (normal) table within a (normal) table. The more complex structure of normal tables (such as titles and column specifications) may cause processing problems. It is not semantically sound to include a full table structure within an existing full table structure.

Note:
Some publishing tools cannot process nested tables.