Accessibility

Create placeholders for repeating content


fpo[an error occurred while processing this directive]

Table of Contents

Created:
15 February 2006

Excerpted from "Real World Adobe InDesign CS2" by Olav Martin Kvern and David Blatner

Tagging text and frames, importing XML, and replacing XML can be used to create and populate placeholder frames for XML content. A key point, however, is that Adobe® InDesign® CS2 will never create new frames or add pages to accommodate new XML elements. InDesign will, however, duplicate text items as you import XML elements into a placeholder story. This means that you can have InDesign repeat the arrangement of placeholder elements and static text for each corresponding element in an imported XML file.

You create placeholder text by creating an XML structure that matches the structure of the XML content you plan to import. You then use the elements from the XML structure to mark up text. The structures do not need to be an exact match, but the sequence of elements in the template and the sequence of elements in the incoming XML file must match.

Creating placeholders for XML content

indcs2at_placeholder_1_int

Make a text frame and use tags to create a series of XML placeholders. In this example, the main repeating element—similar to a record in a database—is the “show” element.

indcs2at_placeholder_2_int

Choose Import XML from the Structure menu or the File menu.

indcs2at_placeholder_3_int

Choose Merge Content in the XML Import Options dialog box. Select Clone Repeating Text Elements. Select Do Not Import Contents Of Whitespace-Only Elements to preserve any static text you have added between placeholder elements.

indcs2at_placeholder_4_int

InDesign flows the XML data into the story, repeating the XML elements that match the structure of the placeholder elements.

indcs2at_placeholder_5_int

Each “show” element is laid out according to the format of the placeholder elements.

About the author

[an error occurred while processing this directive]