Elements in structured documents

Understand what elements are, what makes them valid and the two classes of elements.

In this topic

Introduction

The basic unit of information in structured documents is called an element. Elements hold other elements, text, graphics, tables, cross-references, and markers.

You can add elements to a document to build its structure, and you can edit existing elements in many ways.

To build a document’s structure, you can either add elements to the document and then fill in the contents, or select existing contents and wrap them in elements.

A structured document has element definitions stored in its Elements catalog. These definitions describe the allowable contents for each type of element the document can have. They sometimes specify attributes and formatting for the elements. If all the elements in a document have contents and attributes that meet these specifications, the document is valid.

Valid contents for elements

An element’s definition has content rules that determine what the element can contain. For example, perhaps the definition of a <section> element specifies that a section must begin with a <title> element, and then can have any combination of <p>, <image>, and <table>. A <p> element sometimes allows text and <xref> elements, in any order.

The Elements catalog indicates valid elements for the current location with a heavy check mark. If an element can contain text, it shows that text is allowed with the <TEXT> label.

Element classes

Elements fall into two basic classes determined by their allowable contents:

Figure 1. Container element and object element
Containerelement and object element

A. Containers have round-cornered bubbles. B. Object elements have square-cornered bubbles.

A container element can be defined to remain empty. For example, perhaps a table cell is empty as part of a table’s design. If an element contains only spaces or non-printable characters such as tabulators, its text snippet in the Structure View is <WHITESPACE>.