beautypg.com

Create a placeholder table, Create placeholder structure for repeating data – Adobe InDesign CS5 User Manual

Page 583

background image

577

USING INDESIGN

XML

Last updated 11/16/2011

Create a placeholder table

You can import XML elements into a placeholder table as well as a placeholder frame. In a table, each cell is represented
by an element. InDesign places XML content into the table cell by cell, element by element, starting from the top left
corner of the table, matching the element to the tagged cell. When creating placeholder tables, you must tag the table
as well as each cell in the table. (Merged cells are considered a single cell.)

Because InDesign doesn’t distinguish between rows and columns when importing, the number of columns in the
placeholder must match the number of columns in the imported content. Also, all the table cell elements must be
contained within a single table element. In other words, the cells are all sibling elements under the same parent.

Placeholder table (above) and flow of XML content into placeholder table (below)

1 Open the Tags panel (Window

> Utilities > Tags) and the Structure pane (View

> Structure > Show Structure).

2 If the Tags panel doesn’t contain tag names identical to the names of the XML table elements you plan to import,

either load tags from an existing document or create the tags.

Note: At a minimum you must have tags for the parent element of the table cells, the table cells, and the element in which
the table will reside.

3 Create a table containing the appropriate number of columns for the XML content. You don’t need to create the

exact number of rows, as InDesign will add rows to the table if needed.

4 With an insertion point in the table, choose Table

> Select > Table, and select the appropriate tag in the Tags panel.

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.