Working with the Structure View

Expand or collapse structure

In the Structure View, you can expand or collapse elements, showing or hiding a detailed outline of your document. (When elements are expanded or collapsed in Structure View, text in the document window does not change.)

An element is sometimes defined to have attributes, which provide supplemental information about the element. You can also expand and collapse the attributes associated with an element.

tip:  Collapse elements to get a higher-level look at the document structure. Collapsed elements are also easier to move around. It’s especially helpful to collapse long lists of items and procedures with many steps.

To expand or collapse elements, click the plus (+) or minus (-) symbol on the left side of element bubbles.

To expand or collapse attributes, click the plus (+) or minus (-) symbol on the right side of element bubbles.

To expand or collapse all child elements or attributes, hold down Shift while you click a plus or minus sign.

View element boundaries in the document window

Element boundaries shown in the document window mark the beginning and end of each element. Working with visible boundaries helps you see how the document content is divided into elements. Viewing the boundaries also makes it easier to place an insertion point properly or to make the right selection.

For most elements, the boundaries appear as opening and closing brackets ( [ ] ) or as two boxes with an element tag. For some elements (graphics, footnotes, markers, tables, and equations), the element location is marked only by one box with a tag.

When elements are inside other elements, their brackets or tags nest to show the hierarchy.

To surround each element with brackets, choose View > Element Boundaries.

To surround each element with a text label, choose View > Element Boundaries (As Tags).

If the book window is active, select View > Show Element Boundaries or View > Hide Element Boundaries.

To hide element boundaries, choose View > Hide Element Boundaries or Element Boundaries (As Tags).

note:  The brackets and tags that mark element boundaries are characters that both print and occupy document space. Hide them before printing to suppress them in print output. Also hide them to see the document layout unaltered by element boundaries.

Expand and collapse elements in document window

If you are viewing element boundaries as tags in the document window, you can perform the following operations:

Collapse all elements, even in the document view.

Collapse a parent element to hide the child elements, without collapsing them.

Collapse child elements, when collapsing the parent element.

Collapse all elements to the same level, when collapsing an element.

Select the element, by clicking the element tag.

Toggle the collapsed state of an element, by double-clicking the element tag.

View expanded element structure, when any operation (for example, Find/Change) results in a selection, within a collapsed element structure.

Have the document view and structure view synchronized with respect to the collapsed state of the elements.

Show and hide attributes for new elements

You can show or hide attributes for new elements in Structure View. The view can display all the attributes in the flow, none of the attributes, or only required attributes or attributes that have a value. This setting applies to new elements as you enter them.

1)Make the appropriate document window or book window active. If a book window is active, select the documents you want to affect.

2)Select View > Attribute Display Options, choose the display option you want, and click Set.

Change the scope of elements available in a structured document

When adding elements to a structured document, insert only elements that are valid at the current location. (Valid elements have heavy check marks, heavy check marks and a plus sign, and question marks in the Element Catalog.) If you add elements this way, you can work from the beginning of a document to the end and be sure that its structure is valid at every point along the way.

Sometimes you want to work more loosely, and in these cases you can make more elements available. For example, some draft documents must adhere strictly to a predefined structure but follow the structure only as a guideline. Or, you can plan your document to conform to a structure without having all the information to complete it from start to finish.

When more elements are available, the additional elements appear in the Element Catalog and are available if you insert elements from the keyboard. You can also list inclusions after other valid elements in the catalog.

1)Make the appropriate document window or book window active. If a book window is active, select the documents you want to affect.

2)Select Element > Set Available Elements. You can also click Options in the Element Catalog.

3)Select one of the following options in the Show Tags For area:

To show only elements that are valid for the current location, select Valid Elements for Working Start to Finish. Use this option if you plan to go through a document from start to finish and fill in the elements in their correct order and hierarchy.

To show elements that are valid for the current location or later in the current element, select Valid Elements for Working in Any Order. Use this setting if you plan to build a valid document but not necessarily by working from start to finish. This is helpful if you don’t have all the information you need.

To show elements allowed anywhere in the current element, select Elements Allowed Anywhere in Parent. Use this setting if you want more flexibility for filling in elements. You can insert elements that are invalid and correct the errors later.

To show all elements defined for the document, select All Elements. Use this setting if you’re not building a valid document, if you want flexibility and will correct errors later, if you’re wrapping elements around contents, or if you want to see what’s available else­where in the document.

To show a set of elements that you specify, select Customized List. Use this setting to work with a subset of the elements, to display elements in a fixed order, or to work with a list that is static instead of context sensitive.

4)If you selected Customized List, click Edit and create or change a list of elements.

To move element tags between the Show and Don’t Show lists, use the arrow buttons or double-click the element tags. Transfer all of the elements from one list to another by holding down Shift as you click an arrow button. Click the Move Up and Move Down buttons to arrange the elements in the Show list in the order you want them to appear in the Element Catalog. Click Set when the list is the way you want it.

note:  A customized list of tags is always the same regardless of the location of the insertion point, so be careful to include all the tags you need. The only indication of validity is a check mark next to a tag.

5)To list inclusions separately in the Element Catalog, turn on List after Other Valid Elements.

This groups the inclusions right after the other valid elements. Use this setting if you have a large number of inclusions that you rarely need.

6)Click Set.

Structure View pod

The Structure View pod displays the underlying XML structure. The view uses bubbles to represent elements and their relationship to one another. It also identifies errors in the document structure. In Structure View, you can insert, select, expand, collapse, move, merge, or split elements. When you work with structured documents, you’ll use the document window and Structure View together. These windows help you organize elements in a valid structure.

Both windows are editable, and anything you do in one is mirrored in the other. You can have the two views open side by side, to keep track of both contents and structure. If you click or select in one view, an insertion point or selection appears at the equivalent place in the other view. Any editing you do in one is reflected in the other. It’s easier to make your changes in Structure View, where you can drag-and-drop bubbles to rearrange elements or select bubbles to edit them in other ways. If you click or select in an unstructured flow in a document window, Structure View is empty.

To display, choose Structure Tools > Structure View.

Elements catalog

The Elements catalog lists the elements you can use at the current location and provides commands for adding and editing elements. It also displays other information about the current location, such as whether you can type text there. The information in the Elements catalog comes from content rules in the definition for the current element.

The catalog is preset to show only the elements that are valid at the current location, though you can have it display more elements if you want greater flexibility. The catalog is empty if you click or select in an unstructured flow, if the document has no element definitions, or if no more elements are required at the current location.

To display, click the Element Catalog button at the upper-right corner in the document window.

The Elements catalog uses the following symbols to identify whether an element is valid:

Heavy check mark

The element is valid at the current location. If you insert the element, the current (parent) element will be correct and complete up to this location.

Plus sign (+)

The element is an inclusion (SGML only) in the current element and is valid at the current location. The plus sign always appears next to a heavy check mark. Inclusions are valid only in SGML documents, so this sign does not appear in XML documents.

tip:  Although inclusions are as valid as elements identified with just a heavy check mark, you might find it helpful to list inclusions separately. If a document has many inclusions, it can be difficult to find other valid elements in the catalog.

Question mark (?)

The element is a possible replacement for the element right after the insertion point or for the selected elements. It is valid at the current location, but will make child elements after it invalid. If you insert an element with a question mark, the current (parent) element will be complete and correct up to this location, but you’ll have to correct errors after the new element.

Light check mark

The element is valid later in the current element. If you insert one of these elements, the current (parent) element will be correct but incomplete up to this location. You’ll have to go back and fill in missing child elements.

No symbol

If an element in the catalog has no symbol, it is not valid at the current location or later in the current element. It may be valid earlier in the current element or outside the element.

The Elements catalog may also include the following indicators to provide other information about the current location:

<TEXT>

You can type text at this point.

<UNDEFINED>

The current element does not have a definition in the document. The element was probably pasted from a document with different element definitions. (This does not appear when the catalog is set to display all elements.)

<INVALID>

The contents of the current element are invalid. (This does not appear when the catalog is set to display all elements.)

You can use buttons in the Element Catalog to insert an empty element, wrap an element around contents, and change the type of an existing element.