InDesign

About automatic layout

Using InDesign, you can automatically place imported XML content into a layout. To do this, you first create placeholder frames or tables, and tag them with the same tag names as the XML elements you want to place into them. Then, you import XML content into the placeholders in Merge mode. When tags match by name and by structural hierarchy, InDesign merges the XML content, replacing any existing content in the document.

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.