IDML Reference / Package anatomy
The design map
designmap.xml is the root of an IDML package — document settings, the definitions that belong to the whole document, and an idPkg reference to every part.
Reviewed against engine v0.71.6
designmap.xml is the root of an IDML package: it holds the document's own settings and definitions, and names every other part.
In short The design map's root Document element carries document-wide attributes:
the DOM version, the story list, the colour profiles and rendering intents. Its children are
of two kinds. idPkg:* elements reference the other parts by a src path. The rest are
definitions that belong to the whole document rather than to one part: layers, sections,
text variables, hyperlinks and bookmarks, conditions, numbering lists and colour groups.
Open the design map and you see the whole shape of the document before reading anything
else.
The package below has two stories in two frames. Note how StoryList enumerates the
stories and how each idPkg:* element points at a part by src.
The design map of a two-story document, the manifest that ties the package together.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?aid style="50" type="document" readerVersion="6.0" featureSet="257" product="20.0(32)"?>
<Document xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0" Self="d" StoryList="ustory1 ustory2" Name="two-stories.indd" CMYKProfile="Coated FOGRA39 (ISO 12647-2:2004)" RGBProfile="sRGB IEC61966-2.1" SolidColorIntent="UseColorSettings" AfterBlendingIntent="UseColorSettings" DefaultImageIntent="UseColorSettings">
<idPkg:Graphic src="Resources/Graphic.xml"/>
<idPkg:Fonts src="Resources/Fonts.xml"/>
<idPkg:Styles src="Resources/Styles.xml"/>
<idPkg:Preferences src="Resources/Preferences.xml"/>
<idPkg:Tags src="XML/Tags.xml"/>
<idPkg:MasterSpread src="MasterSpreads/MasterSpread_umaster.xml"/>
<idPkg:Spread src="Spreads/Spread_uspread.xml"/>
<idPkg:Story src="Stories/Story_ustory1.xml"/>
<idPkg:Story src="Stories/Story_ustory2.xml"/>
<idPkg:BackingStory src="XML/BackingStory.xml"/>
</Document>
The processing instruction
Before the root element, InDesign writes an <?aid … ?> processing instruction. Its
pseudo-attributes record the package style, the reader version the file targets, a feature
set and the exporting product build, for example product="20.0(32)". It describes the
file; the document's content does not depend on it. See
version markers.
The Document element
| Attribute · Document | Values | Seen in |
|---|---|---|
| AfterBlendingIntent | UseColorSettings | 100% |
| CMYKProfile | builtin / text | 100% |
| DefaultImageIntent | UseColorSettings | 100% |
| DOMVersion | real | 100% |
| RGBProfile | builtin / text | 100% |
| Self | text | 100% |
| SolidColorIntent | UseColorSettings | 100% |
| StoryList | id | 100% |
| AccurateLABSpots | false | 89% |
DOMVersionnames the scripting-DOM revision the package was written for, such as20.0. Every part repeats it on its root element.StoryListlists the ids of the document's stories, one peridPkg:Story.CMYKProfile,RGBProfilename the document's colour profiles, andSolidColorIntent,AfterBlendingIntent,DefaultImageIntentthe rendering intents for solid colours, transparency blending and images. See colour and swatches.Nameis the file name of the document it was exported from; descriptive only.
The part references
Each idPkg:* child names one part by a src path relative to the package root. A reader
expects every named part to be in the archive; entries the design map does not name are
not part of the document.
| Reference | Part | How many |
|---|---|---|
idPkg:Graphic | Resources/Graphic.xml | one |
idPkg:Fonts | Resources/Fonts.xml | one |
idPkg:Styles | Resources/Styles.xml | one |
idPkg:Preferences | Resources/Preferences.xml | one |
idPkg:Tags | XML/Tags.xml | one |
idPkg:MasterSpread | MasterSpreads/MasterSpread_<id>.xml | one per master spread |
idPkg:Spread | Spreads/Spread_<id>.xml | one per spread, in page order |
idPkg:Story | Stories/Story_<id>.xml | one per story |
idPkg:BackingStory | XML/BackingStory.xml | one |
The order of the spread references is the order of the spreads in the document. The resource parts are described in resource parts, the spreads and stories in content parts.
Definitions that live in the design map
Some definitions belong to the document as a whole, so InDesign writes them as direct
children of Document rather than in a resource part. The counts are from the census of
305 packages behind the element reference:
| Element | What it defines | Packages |
|---|---|---|
TextVariable | A computed piece of text, such as a running header or the file name | 273 |
Layer | A layer; a Layer inside a Layer is a layer group | 272 |
Section | Where page numbering restarts, and how it is styled | 272 |
NumberingList | A named list that numbered paragraphs continue across | 271 |
ColorGroup | A folder of swatches in the Swatches panel, members as ColorGroupSwatch | 265 |
ConditionalTextPreference | Which condition set is active, and whether indicators show | 271 |
Condition, ConditionSet | Conditional-text tags and saved visibility sets | when used |
HyperlinkURLDestination, HyperlinkPageDestination, Hyperlink, Bookmark | Hyperlinks and bookmarks | when used |
Two placements were measured in InDesign 20.0.1 and matter to a writer:
- Conditions belong here, not in
Styles.xml. A condition set lists its members asVisibilityPairrecords inside a typedSetConditionsproperty. - The hyperlink and bookmark block comes after the last
idPkg:Story. Placed earlier, InDesign binds none of it.
The full list of such rules is in what InDesign needs to open a file.
In Paged: the importer reads
Document's attributes, the part references, and the layers (nested), sections, text variables, numbering lists, colour groups, hyperlinks, bookmarks and conditions in the design map. It reads numbering lists and conditions fromStyles.xmltoo, for older files, and the design map wins on a clash. It does not readMETA-INF/container.xml, theXML/parts, orFonts.xml. Parsed, not rendered
What the design map does not hold
It lists the stories but does not contain them: the text lives in the story parts. It
names the spreads but holds no geometry. How the ids in one part find their targets in
another (ParentStory, AppliedMaster, style and swatch references) is the subject of
how the parts reference each other.
Frequently asked questions
What is the design map in an IDML file?
designmap.xml, the package's root part. Its Document element holds document-wide
settings, the definitions that belong to the whole document, and an idPkg:* reference to
every other part.
What does the StoryList attribute do?
It lists the ids of the document's stories. Each id has a matching idPkg:Story naming
the part that holds it, and the same id appears as ParentStory on the frames the story
flows through.
Where are layers, sections and conditions defined?
In the design map, as direct children of Document. InDesign writes conditional-text
conditions here too, not in Styles.xml.
Does the order of elements in the design map matter?
For some of them, yes. The spread references are in page order, and InDesign only binds
hyperlinks and bookmarks that come after the last idPkg:Story reference.
Does the design map contain the document's text and pages? No. It names the parts; the pages are in the spread parts and the text is in the story parts.
The ZIP container
An IDML file is a ZIP archive made self-identifying by a leading, uncompressed mimetype entry and a META-INF folder that points at designmap.xml.
Resource parts
The Resources folder holds an IDML document's shared definitions — swatches in Graphic.xml, faces in Fonts.xml, styles and preferences.