beautypg.com

About dtd files, Xml rule sets, Preparing xml files for k4 or incopy workflows – Adobe InDesign CS5 User Manual

Page 575

background image

569

USING INDESIGN

XML

Last updated 11/16/2011

The Structure pane lets you view, edit, and manage XML elements. You use the Structure pane in many ways when
working with XML. For example, to place imported XML content into the layout, you can drag elements from the
Structure pane directly to a page. You also use the Structure pane to adjust the hierarchy of the elements. You can add
elements, attributes, comments, and processing instructions by way of the Structure pane.

The Tags panel lists tags for elements. You can import, export, add, delete, and rename tags. You use the Tags panel
to apply element tags to content that you plan to export to XML, and to apply tags to frames before importing XML
content into them.

More Help topics

Structure pane overview

” on page 586

About DTD files

To share XML data with others, you need to agree on a standard set of tag names and element attributes so that
everyone in your group uses and applies tags the same way. One method for handling the sharing of XML data is to
use a document type definition (DTD) file.

A DTD file provides a set of elements and attributes for members of the group to use. It also defines the rules about
where elements can appear in the structural hierarchy. For example, the DTD file may require the Title element to be
a child of the Story element because the title is supposed to appear inside the story; if you tag a title without tagging the
story it appears in, the DTD file marks the Title element as invalid. You can search for and flag invalid structural errors
in an InDesign file with a DTD file. This process is called validating.

To use a DTD file (if your document doesn’t already contain one), you load it into your document. This imports the
element names from the DTD into the Tags panel. Others who have loaded the same DTD file have the same element
names, which ensures that everyone in the group uses the same elements. The imported elements are locked, which
means they can’t be deleted or renamed unless the DTD file is deleted from the document.

You may find that a DTD file created by a group or industry similar to yours includes tags and structures that meet
your needs. For a current list of registered DTDs, visit

www.xml.com/pub/rg/DTD_Repositories

(English only).

More Help topics

Use DTD files to validate XML

” on page 592

XML rule sets

XML rule sets are sets of instructions written in a scripting language (such as JavaScript or AppleScript) that evaluate
XML data and take certain actions if that data meets certain conditions. Each rule consists of at least one condition and
at least one action. A rule evaluates the XML data against the conditions, and if a condition is met, then it takes the
appropriate action. For example, an XML rule can specify that whenever the Paragraph element appears under the
Subhead element (a condition), a specific style (an action) is applied; or that whenever the Product element (a
condition) appears, a new frame is created and a product image is imported (actions). XML rules are a means of
dynamically creating and formatting layouts based on XML.

For information on XML rule sets and other XML scripting resources, see

www.adobe.com/go/learn_id_XMLscript

.

Preparing XML files for K4 or InCopy workflows

To prepare files with XML tagging for use within the K4 or InDesign/InCopy workflow environments, you may need
to adjust how you prepare the structure and import XML into InDesign files.