beautypg.com

Adobe InDesign CS3 User Manual

Page 528

background image

INDESIGN CS3

User Guide

521

5

Tag each cell of the table with the desired tag. Depending on the structure of your XML content, you can either

select and tag the cells individually, or you can select an entire row or column—for example, if you want to tag the
first, or heading row—and tag all the selected cells using the same tag.

6

As necessary, rearrange and add elements in the Structure pane so that your document has the same elements and

structure as the XML file you will import.

Create placeholder structure for repeating data

The same rules for merging XML also apply when merging repeating XML: The structure of the elements in the
Structure pane must parallel the structure of the imported XML data, and any placeholder frames must be tagged
with the same tag names as the parent elements in the XML file.

Structure pane showing structure of placeholder text

A. Element that will contain all repeated elements B. Element that will be cloned as repeating XML content is imported C. Child elements for
data contained in the repeating element

1

First, you will need a parent or root element that describes the collection of information, or records, you will

import.

For example, a

Chapter

element that will contain a series of recipes.

2

Under that parent, create one element that describes the information (or record) that will repeat.

For example, under the

Chapter

element, you might create a

Recipe

element. This is the element that will be cloned

for each record in the imported XML.

3

Under this element, create child elements to describe the units of information (or fields) that make up the record.

For example, under the

Recipe

element, you might create

Recipename

,

Ingredients

,

Instructions

,

Notes

, and

Serving

elements.

To include labels, returns, or tabs between “field” elements in the repeating XML data, create placeholder elements
in the frame the imported content will be merged into. And add spacing or labels as needed between the placeholders.

Create placeholder text

1

Open an existing document, or create a new document for the XML.

2

Open the Tags panel (Window > Tags) and the Structure pane (View > Structure > Show Structure).

3

Make sure the Tags panel contains tag names that are identical to the names of elements you will import with the

XML file, and create new tags or load the necessary tags if necessary.

Importing a sample of the XML content is the easiest way to obtain all the necessary tags and to ensure that the
document structure matches the XML file.

4

Create placeholder frames (and thread them together) as needed for your XML content.

A

B

C