paged.IDML Reference
Tagged XML inside IDML

Tagged XML inside IDML

IDML's second view of a document — an XML structure an author tags over the same text and frames as the layout, stored in XML/Tags.xml and XML/BackingStory.xml.

Tier: IntermediateIntermediateIIexplanation

Tagged XML is a second view of an IDML document: the same content organised as a tree of user-defined tags instead of as pages.

In short In InDesign an author can tag content with their own XML structure: wrap a heading and its body in a chapter element, mark a price as price. That structure is independent of the layout, and IDML records it apart from the stories and spreads. The tag names are XMLTag elements in XML/Tags.xml; the tree of tagged elements lives in XML/BackingStory.xml, rooted in an XmlStory. Both parts are in every package, because every document has at least a root element, even when nobody tagged anything.

What the layer is

The same heading can be an h1 in the document's XML and a "Heading 1" paragraph in the layout at the same time: two labels on one piece of content. Tagging does not move or copy the text. The XML tree refers to placed content, so the tree and the stories describe the same characters from two directions. Content that has been tagged but not yet placed on a page waits in the backing story.

The layer is spread over these parts:

PartHoldsIn the census
XML/Tags.xmlthe tag names a document defines, one XMLTag eachall 305 documents
XML/BackingStory.xmlthe XmlStory with the tree of XMLElementsall 305 documents
XML/Mapping.xmlmaps between tags and stylesonly generated files

The design map references Tags.xml and BackingStory.xml with idPkg:Tags and idPkg:BackingStory. An untagged InDesign document carries one tag, Root, and one XMLElement that applies it.

Why a reader cares

If you generate IDML for a publishing pipeline, the tagged structure is how downstream tools find content by meaning rather than by position. If you render or extract IDML, it is safe to set aside: nothing in the XML layer changes where a glyph lands, and the text you need is in the stories. If you edit and save IDML, keep the XML parts: they are part of the document, and a file without them is not the document InDesign wrote.

In this chapter

In Paged: the XML layer is not read; a document renders the same with or without it. It is not lost either: saving copies the XML parts byte for byte.

Planned

Frequently asked questions

What is the tagged-XML layer in IDML? A tree of user-defined XML tags drawn over a document's text and frames, stored in XML/Tags.xml and XML/BackingStory.xml. It describes the content by meaning, beside the layout that places it.

Is the XML layer in every IDML file? Tags.xml and BackingStory.xml are: an untagged document still has a Root tag and a root element. Mapping.xml appears only in some generated files.

Do I need the XML layer to render a document? No. Layout comes from the spreads, stories and styles. The XML layer labels that content without changing it.

Can I delete the XML/ parts? Not safely. The design map references them, and the tagged structure is part of the document an author made. Keep them when you save.

On this page