I am writing an XSLT transform from WordML into XML, formatted for import into InDesign. But I'm having trouble with getting Table content (not CALS tables) to flow into the InDesign document as expected. When I use the <Table><Cell><para>some content</para></Cell></Table>
structure in my XML, the XML cells are appended to the beginning of the Table (with some strange content overlap), rather than replacing the existing Cells in the InDesign document. But when I don't include <Cell>
tags in my XML or InDesign document, the content imports in just fine.
I would much prefer being able to use Cell tags in my XML, as that is more straightforward in the case that there is more than one element inside a particular cell. I'm looking for suggestions on how to get the first structure to work.
InDesign document Table tag structure (each cell is a row/column):
Table Cell H1 Cell H4 Cell para
Corresponding XML structure (the line breaks are particular, to avoid unwanted line breaks in imported content):
<Table><Cell><H1>Heading</H1></Cell>
<Cell><H4>Sub-Heading</H4></Cell>
<Cell><para>Some content goes here.</para></Cell>
</Table>
Unexpected results, in InDesign document tag structure:
Table
Cell
H1 (imported content)
Cell
H4 (imported content)
H1 (document placeholder content)
Cell
para (imported content)
H1 (document placeholder content)
Cell
H4 (document placeholder content)
Cell
para (document placeholder content)
InDesign document tag structure that, surprisingly, does work, but is not ideal:
Table H1 H4 para
Corresponding XML code:
<Table><H1>Heading</H1>
<H4>Sub-Heading</H4>
<para>Some content goes here.</para>
</Table>