Content parts
The Spreads, MasterSpreads, and Stories parts hold an IDML document itself — the pages, the shapes that sit on them, and the text — each tied to the design map by a Self id derived from its file name.
The content parts — Spreads, MasterSpreads, and Stories — hold the document itself: its pages, the shapes on them, and the text.
In short: If the resource parts are an IDML document's shared vocabulary, the
content parts are the document itself: where the pages are, what shapes sit on
them, and what text those shapes hold. Three folders carry it — Spreads (pages
and the items on them), MasterSpreads (the template pages they inherit from), and
Stories (the text and its formatting). Each part is one file, named so the design
map can point at it and so the parser can derive its Self id back from the file
name. This page covers what each folder holds and how those ids tie the parts to
the design map.
The design map lists these parts with idPkg:Spread, idPkg:MasterSpread, and
idPkg:Story elements, each carrying a src path. The embed below shows that
manifest for a two-story document — note the two idPkg:Story entries that match
the StoryList and the two text frames in the single spread.
A one-page, two-story package: one spread with two frames, two stories, one master.
designmap.xml<?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>
Spreads/Spread_*.xml — pages and the items on them
A spread part holds one <Spread> element. Inside it are the <Page> elements
(the spread's pages) and the page items that sit on those pages — <TextFrame>,
<Rectangle>, <Oval>, <GraphicLine>, <Polygon>, and <Group>. The parser
reads page bounds and a flat, z-ordered list of items per spread; a <TextFrame>
is the bridge to text, because it names a story rather than containing the words
itself.
| Attribute · Page | Type / values | Support | Notes |
|---|---|---|---|
| Self | string id | Supported | The page id (e.g. "upage"). |
| GeometricBounds | "y1 x1 y2 x2" in points | Supported | Page rectangle in the page’s own coordinate space. Y grows downward. |
| AppliedMaster | MasterSpread id | Supported | The master this page inherits from; resolved to a MasterSpread by id. "n" means none. |
| ItemTransform | 6 numbers (affine) | Supported | Maps the page’s coords into the spread. Absent ⇒ identity. |
| OverrideList | space-separated ids | Supported | Master items this page has overridden; the originals are not stamped onto the page. |
| Name | string | Supported | The page label as InDesign numbered it ("1", "iii", "A-3"); substituted for auto-page-number markers. |
| Attribute · TextFrame | Type / values | Support | Notes |
|---|---|---|---|
| Self | string id | Supported | The frame id (e.g. "uframe1"); the target of another frame’s NextTextFrame. |
| ParentStory | Story id | Supported | The story whose text flows into this frame. This is the link from spread to story. |
| GeometricBounds / PathGeometry | bounds or path | Supported | The frame’s shape; supplies the column box the text composes into. |
| ItemTransform | 6 numbers (affine) | Supported | Places the frame in the spread. Absent ⇒ identity. |
| NextTextFrame | TextFrame id | Supported | The frame this story continues into when it overflows. "n" / absent ends the chain. |
| AppliedObjectStyle | ObjectStyle id | Supported | Fill / stroke / corner defaults; resolved against Styles.xml. Real documents rely on this over per-frame FillColor. |
| FillColor / StrokeColor | Color or Swatch id | Supported | Per-frame paint overrides; resolved against the Graphic palette. Swatch/None means no paint. |
A text frame nested inside a <Group> is currently skipped, and the spread
records a count of how many it dropped so a consumer can detect the loss.
MasterSpreads/MasterSpread_*.xml — the master pages
A master spread is the template a body page inherits from. Its XML is the same
shape as a regular spread — one <MasterSpread> element with <Page> children
and the same kinds of page items — so the parser reuses the spread parser to read
it. The parser loads every master first, before the body spreads, and keys each
by the Self id derived from its file name (MasterSpreads/MasterSpread_umaster.xml
→ umaster). A page's AppliedMaster resolves against that table, whether it
gives the bare id or the full MasterSpread/umaster reference.
Stories/Story_*.xml — the text
A story part holds one <Story> element: the text and its formatting, with no
geometry. The parser reads it as a tree of <ParagraphStyleRange> →
<CharacterStyleRange> → <Content>, collapsing the content runs into paragraphs
of styled runs. The styles a story applies are named, not embedded — a paragraph
range carries AppliedParagraphStyle, a character range carries
AppliedCharacterStyle and any local overrides, and those names resolve against
Styles.xml.
| Attribute · Story content | Type / values | Support | Notes |
|---|---|---|---|
| Story@Self | string id | Supported | The story id (e.g. "ustory1"); matches an entry in the document’s StoryList and a TextFrame’s ParentStory. |
| ParagraphStyleRange@AppliedParagraphStyle | ParagraphStyle id | Supported | The paragraph style for this range; resolved against Styles.xml. Also the layer the cascade falls through to. |
| CharacterStyleRange@AppliedCharacterStyle | CharacterStyle id | Supported | The character style for this run; local attributes on the range override it. |
| Content | text | Supported | The literal characters. A sibling <Br/> is a forced line break within the paragraph; a new <ParagraphStyleRange> starts a new paragraph. |
| StoryDirection | Horizontal | VerticalWritingDirection | Parsed, not yet rendered | CJK vertical-text flag. Captured; the layout does not yet honour vertical writing. |
How the Self ids tie back to the design map
The design map's StoryList is just a list of story ids; each id should have a
matching idPkg:Story whose src names the file, and the parser derives the
story's Self id back from that file name (Stories/Story_ustory1.xml →
ustory1). The same id appears again as a frame's ParentStory in some spread.
That triple — listed in the manifest, named on a frame, carried on the story
element — is what places a story's text on a page. Following those ids from part
to part is the subject of how the parts reference each other.
Frequently asked questions
What is the difference between a spread, a master spread, and a story?
A spread part holds the pages and the page items (text frames, rectangles, and
the like) that sit on them. A master spread is the template a body page inherits
from, written in the same shape as a regular spread. A story holds the text and
its formatting, with no geometry — a text frame in a spread links to a story by
naming it in ParentStory.
How does a TextFrame connect to the text it displays?
A TextFrame does not contain words; it names a story in its ParentStory
attribute. The story part holds the actual text, and the frame supplies the box the
text composes into — which is why a frame is the bridge from a spread to a story.
How is a content part's Self id related to its file name?
For spreads, master spreads, and stories, the parser derives the part's Self id
from its file name — Stories/Story_ustory1.xml yields ustory1, and
MasterSpreads/MasterSpread_umaster.xml yields umaster. That id is what the
design map's StoryList, a frame's ParentStory, and a page's AppliedMaster
resolve against.
Resource parts
The Resources folder holds an IDML document's shared definitions — colors and gradients in Graphic.xml, named styles in Styles.xml, the font manifest in Fonts.xml, and document preferences in Preferences.xml.
How the parts reference each other
An IDML document's separate XML parts become one document through id references — almost every cross-part link is a Self id looked up in a table the parser builds at open time.