The Structure pane displays, in hierarchical form, items in a document that have been marked with XML tags. These items are called elements. You can move elements in the Structure pane to define the order and hierarchy of items. An element consists of an icon indicating the element type and a tag name.
A. Triangle to expand or collapse elements B. Element C. Text snippet D. Attribute
A. Triangle to expand or collapse elements B. Element C. Text snippet D. Attribute
Blue diamond
A blue diamond on an element icon means that the element is attached to an item on the page; the absence of a blue diamond means that the element has not been attached to a page item.
Underline
The tag name is underlined if the item on the page to which the element corresponds is selected. For example, if you select text to which you assigned the Title tag, the word Title in the text’s element is underlined in the Structure pane. Underlining shows you whether selected items on the page and elements in the Structure pane correspond.
Text snippet
The first 32 characters of tagged text, called a text snippet, can appear to the right of the element. These snippets help you identify the page item to which an element corresponds.
Dot and attribute
Attributes provide metadata information about an element. If attributes are attached to an element, a black dot along with attribute names and values appear below the element.
- To open the Structure pane, choose View > Structure > Show Structure.
- To close the Structure pane, choose View > Structure > Hide Structure, or click the splitter button.
- To expand or collapse an element (and display or hide any of its child elements), click the triangle next to the element.
- To adjust the size of the Structure pane, drag the splitter button.
- To expand or contract an element as well as all elements contained within it, hold down Ctrl (Windows) or Command (Mac OS) while clicking the triangle next to the element.
- To show or hide text snippets, choose Show Text Snippets or Hide Text Snippets from the Structure pane menu.
Icon |
Name |
Use |
---|---|---|
|
Root element |
Each document includes one root element at the top, which can be renamed but cannot be moved or deleted. |
|
Story element |
Represents tagged stories (one or more linked frames). |
|
Text element |
Represents tagged text within a frame. |
|
Graphic element |
Represents a tagged frame that includes a placed image. Each graphic element includes an href attribute that defines the path or URL to the linked file. |
|
Unplaced text element |
Unplaced text element not yet associated with a page item. |
|
Unplaced graphic element |
Unplaced graphic element not yet associated with a page item. |
|
Table element |
Represents a table. |
|
Header cell element |
Represents a cell in the header row of a table. |
|
Body cell element |
Represents a cell within the body of a table. |
|
Footer cell element |
Represents a cell in the footer row of a table. |
|
Empty element |
An empty frame is associated with this element. |
|
Attribute |
Includes metadata, such as keywords or location of a linked image (HREF attribute). |
|
Comment |
Includes comments that appear in the XML file, but not the InDesign document. |
|
Processing instruction |
Includes an instruction that triggers an action in applications that can read processing instructions. |
|
DOCTYPE element |
Tells InDesign which DTD file to use when validating the XML file. |
You can change the order and hierarchical rank of elements in the Structure pane. However, observe these rules:
An XML document is required to have a single root element at the top of the structure. The root element contains and is the parent to all other elements. Only the DTD (appearing as a DOCTYPE element), comments, and processing instructions may appear above the root element in the Structure pane.
Changes to the XML hierarchy structure may affect the appearance of tagged items on InCopy pages. For example, making a text element the child of an element elsewhere in the structure also moves the text in the layout.
You cannot drag a table cell element into a table element or move elements into a table element.
-
To move an element, drag it to a new location within the structure. A line appears when you drag to indicate where you are inserting the element. The width of the line marks the level within the hierarchy.
To make an element a child of another element, either position it over the parent element to highlight it or place it amongst the parent’s other child elements, and then release the mouse button.
To demote an element by one level in the hierarchy, drag it just above another parent element and move it to the left slightly until the line indicating its placement spans the width of the parent element.
To copy or cut an element, select the element or elements in the Structure pane, and then choose Edit > Copy or Edit > Cut. Select the element directly above where you want to insert the element, and choose Edit > Paste.
Opomba:
When you cut an element, the element and contents are cut to the clipboard, but the frame remains intact.
Insert a parent element in the Structure pane to maintain the proper XML structure or organize content better. Before you can insert a new parent element, you must select the elements that will be the children of the new parent. When the new parent element is inserted, the selected child elements are demoted by one rank in the structural hierarchy.
Opomba:
Insert a new parent element quickly by selecting Add Tag in the Tags panel and then clicking a tag in the panel. You can also right-click (Windows) or Control-click (Mac OS) an element you selected in the Structure pane, choose New Parent Element, and then choose an element.
An attribute provides additional information about an XML element. Each attribute consists of a name and a value. Attributes appear in the Structure pane; they are not placed in the document or used as content in the document. Include attributes with elements for the benefit of files and applications that will use the XML files you create in InCopy .
When you tag an image, InDesign automatically creates an href attribute with a value that defines the on-disk location of the image file. This href attribute allows other files and applications to locate the image on disk so it can be displayed.
You can add attributes to any element except the DOCTYPE element (a DTD file), comments, and processing instructions. For example, to include keywords for searching in a downstream application, you can create an attribute called keywords. You could also create attributes to indicate substituted text, track article titles, and record other content-related information.
Opomba:
If you are using a DTD file, view its contents to see which attributes it allows. Attribute names, like tag names, must conform to the DTD.
Opomba:
InCopy recognizes special namespace attributes that can specify paragraph or character styles, tables and table cell styles, as well as control whitespace. For more information, see the XML technical reference and other resources at www.adobe.com/go/learn_id_XMLscript.
InCopy creates href attributes automatically to handle image files. The href attribute defines the on-disk location of the image file so that the image file can be displayed. When you tag a placed image, InCopy creates an href attribute value that lists the image’s path and filename.
The path can be an absolute link, a relative link to the same folder as the XML file, or a relative link to the Images subfolder of the folder where the XML file is located. Relative paths are specific to the path where the document is saved.
An href attribute with an absolute link looks like the following (in Windows and the Mac OS):
href=file:///C:/Images/Meadow.psd
href=file:///Users/abhayc//Desktop/abc.jpg
An href attribute to an image file in the same folder as the XML file looks like the following:
href=file:Meadow.psd
An href attribute to an image file in the Images subfolder looks like the following:
href=file:///Images/Meadow.psd
You can edit the href attribute to specify a new link to an image. For example, you can edit an absolute link to make it a relative link, thereby making the image file accessible when you export the file.
Using InCopy , you can include comments and processing instructions in an XML file. Enter a comment to include descriptive information about an element. Comments can be viewed in web browsers and text editors. They help others understand XML structure and XML tags. A processing instruction is a special, application-specific command. For example, you can enter a page-break processing instruction so that an application to which you export your XML file understands where to enter a page break. InCopy user-created processing instructions are meant for use in other programs; InCopy itself does not act on processing instructions.
Comments and processing instructions appear in the Structure pane. You can move, edit, and delete comments and processing instructions as you can other elements in the Structure pane. They cannot, however, contain child elements or attributes.
A. Processing instruction B. Comment
Validating the XML in a document means to compare the structure, element tag names, and attributes against the specifications of a DTD file. To validate against a DTD file, you must first load it into your document in InDesign.
Opomba:
Loading a DTD file imports tag names into the Tags panel. These imported tag names are locked; they can’t be deleted or renamed except by deleting the DTD file from the document.
The DOCTYPE element appears at the top of the Structure pane if a DTD file has been loaded into your document. (DTDs are sometimes loaded automatically when you import an XML file.) To replace the DTD file in a document, delete the existing DTD and then load a new one.
A. DOCTYPE element from the DTD file (Structure pane) B. Locked tag from the DTD file (Tags panel)
DTDs are written in ASCII text. They may contain embedded instructions and explanations that describe how to apply tags and order elements correctly. In InDesign, you can only view a DTD that is loaded in a document.
When you validate your document, InCopy alerts you if the XML deviates from rules established by the DTD file. It suggests ways to make the XML meet DTD file requirements. You can fix errors one at a time or view all errors in a separate window.
A. Loaded DTD B. Error or invalidating condition C. Description of error with suggested fix D. Error count E. Validate button F. View all errors in a separate window
A. DOCTYPE element from assigned DTD file B. Error or invalidating condition C. Description of error with suggested fixes D. Error count E. Validate button F. View all errors at once in a separate window
Opomba:
InCopy stops validating after detecting 250 errors. A plus sign in the Error Count box appears when this limit is reached.