Home / Articles / Adobe InDesign / Real World Adobe InDesign CS4: XML

Real World Adobe InDesign CS4: XML

Article Description

XML is as simple or complicated as you care to make it. Olav Martin Kvern and David Blatner show you how to keep it simple, at least at first.
Creating Placeholders for Repeating Content

Creating Placeholders for Repeating Content

All of the techniques we’ve discussed so far—tagging text and frames, importing XML, replacing XML—can be used to create and populate placeholder frames for XML content. A key point, however, is that InDesign will never create new frames or add pages to accommodate new XML elements. InDesign duplicates text items as you import XML elements into a placeholder story. So 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 (see Figure 14-24). 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.

Figure 14.24 Creating Placeholders for XML Content

We know that we said that InDesign won’t create new frames, but there is a way to incorporate graphics in your XML placeholder—and that is to create inline frames. Inline graphic frames can be filled in with a graphic just like XML placeholder text, (see Figure 14-25).

Figure 14.25 Inline Placeholders for Graphics

6. Working with DTDs | Next Section Previous Section