IDML export breaks structure when there is a tagged single row table at the start of a story
When exporting an InDesign document to IDML and re-opening it, a specific set of conditions causes the tag applied to a table to be incorrectly reordered in the XML structure, and an extraneous <Table> tag to be inserted.
This issue occurs when the table is a single-row table and is the very first element in the story (no preceding text or content). This bug disrupts the intended tag hierarchy, breaking workflows that depend on accurate XML structure.
Steps to Reproduce:
- Create a new InDesign document.
- Create a text frame on the page.
- Within the text frame, insert a table.
- a. Ensure the table is the very first element in the story (before any other text or content).
- b. Set the table to have only one row.
- Apply a tag to the table (in my example CustomTable).
- Export to IDML
- Open the IDML
- Open the Structure Panel and examine the structure. You will observe the following:
- a. The "CustomTable" tag now appears before a <Table> tag representing the table. The expected order is the <CustomTable> tag encapsulating, the cells.
- b. The "CustomTable" tag is before the actual table in the story, without any content inside of it.
Expected Result:
The structure of the document should be maintained after exporting to IDML and re-opening.
Actual Result:
The custom tag appears before the table and a <Table> tag is added to the structure, disrupting the intended structure of the XML.
Environment:
InDesign 2024 (19.5)
InDesign 2025 (20.1)
Windows 11