Atomik Xport SE: Reference > Chapter 11 Extracting Tables << >>

11.2 Automatically extracting tables

The next step is to understand the relationship of the table element declaration to the parts of a table as they exist on the InDesign page. You will see two diagrams below that illustrate this based on a table of stock prices. The two illustrations represent the top and bottom portions of the total page shown at the start if the start of the chapter.

Rules for tables are created in exactly the same way as for other elements in your DTD. These rules can be setup through direct association of styles to table DTD tlements (see ‘Working With Rulesets’ for further details).

When making rules you should map the appropriate styles for each row to the appropriate row element in the Atomik Xport DTD, (i.e. ‘TableDataRow’, ‘TableHeadRow’), or to the appropriate section element in the CALS DTD (i.e. thead, tbody).

Unlike previous versions of Atomik Xport, XML table cells can now contain any type of element, or hierarchies of elements, and all the associated metadata which you would normally be able to assign to these text elements.

So, in the Atomik Xport table DTD specified earlier, while you would create rules mapping styles to TableDataRow, TableHeadRow and TableNoteRow, the TableData declaration allows for images and paragraphs to be contained within the table cell, and you can modify its content to suite your purposes.

The advantage that this approach offers is that you can now have multiple types of element within table cells, something which was not previously possible.

Table and Elements and how they relate to the Table Element Declaration.

Typesetting requirements for extracting tables

To successfully extract a tabbed table, it has to be in a single text box. A table that is spread across multiple boxes will not be extracted as a single XML table (although the table may be reconstructed from the individual tables after the extraction process is complete using custom XSLT).

Please also be aware that the table element cannot be used as the root element in your DTD.