Working with repeating data – Adobe InDesign CS3 User Manual
Page 525

INDESIGN CS3
User Guide
518
This technique is useful when you want to use the same layout for different sets of content. For example, a weekly
newsletter may have the same layout from week to week, but offer different content with each publication.
In order for imported XML to be merged directly into a layout, your document must meet these requirements:
•
Frames (or tables) in the document must be tagged with identical tag names as elements in the XML file that you
intend to import.
•
The structure of the document (as shown in the Structure pane) must parallel the structure of the imported XML
file. In other words, the identically named elements must be found in the same locations in the structure hierarchy
of both files. To achieve this parallel structure, you may have to rearrange and reorder elements (and their child
elements) in the Structure pane or use the Apply XSLT option when you import the XML file.
Note: InDesign flows merged XML content into existing frames only. Any element content that doesn’t fit in its frame (or
series of threaded frames) becomes overset text.
See also
“Thread text frames” on page 122
“Rearrange structured elements” on page 531
Working with repeating data
XML is repeating if the same configuration of elements appears multiple times in a row, but the contains unique data
in each instance. For example, database records are repeating. Addresses in a database table contain repeated infor-
mation—name, street address, city, state, postal code—for a variety of individuals.
When you import repeating XML content, you can tell InDesign to clone the repeated elements in the structure.
Cloning allows you to merge repeating XML data into a document without having to create placeholder elements in
the Structure pane (or placeholder text in a frame) for every single record. For example, to import an XML address
list with 25 entries, create a matching element structure for one entry in the Structure pane. When you import the
complete list, InDesign clones that structure to create elements for all 25 entries.
Repeating XML content is flowed as a single story when it is merged into the document. If placeholder frames have
been threaded together, the content is flowed from one frame to the next. If there isn’t enough room in the place-
holder frame(s) to accommodate the XML content, you can autoflow the remaining content by creating and
threading more frames; you don’t have to manually drag elements from the Structure pane into individual frames.
Threaded placeholder in layout (left) and layout after import (right)