This reference describes every element in the DocBook schema.
The description of each element in this reference is divided into the following sections:
Provides a quick synopsis of the element. The content of the synopsis varies according to the nature of the element described, but may include any or all of the following sections:
Describes the content model of the element, the mixture of things that it can contain. See the section called “Understanding Content Models”.
Provides a synopsis of the attributes on the element. For brevity, common attributes are described only once, in this introduction. Likewise, common linking attributes are described once.
Provides a synopsis of any additional constraints on the element. These constraints are expressed using Schematron in the RELAX NG grammar.
Describes the semantics of the element.
Summarizes specific formatting expectations of the element. Many processing expectations are influenced by attribute values. Be sure to consult the description of element attributes as well.
Identifies changes that are scheduled for future versions of the schema. These changes are highlighted because they involve some backward-incompatability that may make currently valid DocBook documents no longer valid under the new version.
Provides examples of proper usage for the element. Generally, the smallest example required to reasonably demonstrate the element is used. In many cases, a formatted version of the example is also shown.
All of the examples printed in the book are valid according to the RELAX NG grammar.
Formatted examples are indicated using a vertical bar.
Each element synopsis begins with a description of its content model. Content models are the way that grammars describe the name, number, and order of other elements that may be used inside an element. This description is presented as a series of nested lists. The rules of RELAX NG are considerably more powerful than the rules of DTDs and I've seen no obvious way to expose them. Suggestions welcome.
Each level of list is introduced by a description of how elements are selected from it:
Exactly one selection must be taken from the list.
Like “one of” but may be omitted entirely.
One selection must be made for each member of the list and those selections must be presented in the order they appear in the list.
Like “sequence of” but may be omitted entirely.
Any number of selections, including none, can be made from the list. Selections can be made in any order, without restriction on order or number of occurrences.
Any number of selections can be made from the list. Selections can be made in any order, without restriction on order or number of occurrences except that at least one must be selected.
Like “one or more of” but may be omitted entirely.
All of the members of the list must be selected exactly once, but they can be selected in any order.
Like “interleave of” but may be omitted entirely.
Individual elements in the list may be followed by an occurrence indicator. If the indicator is “?” the element is optional. Note that this can have an effect on the meaning of the list as a whole. For example, a sequence that consists of only optional elements may have none. This differs, in subtle and unimportant ways, from an optional sequence.
Some of the lists, especially ones that would otherwise be quite long, are subdivided into groups. For example:
info? (db.titleforbidden.info)attribution?literallayout
This extra levels of list (e.g., Paragraph elements) are just a convenience for readers, they don't have any effect on the content model. An epigraph can contain one or more of “literallayout”, “anchor”, “formalpara”, “para”, or “simpara”.
In online versions of this document, rendered with a user agent that supports JavaScript, these lists can be opened and closed dynamically, or removed altogether.
A parser uses the content models to determine if a given document is valid. In order for a document to be valid, the content of every element in the document must “match” the content model for that element.
In practical terms, match means that it must be possible to expand the content model until it exactly matches the sequence of elements in the document.
For example, consider the content model of the epigraph, above, and this example:
<epigraph> <para>Some text</para> </epigraph>
It is valid because the following expansion of the content model exactly matches the actual content: choose zero occurrences of info, zero occurrences of attribution, choose the alternative para from the choice, and choose to let the “one or more” match once.
By the same token, this example is not valid because there is no expansion of the content model that can match it:
<epigraph> <para>Some text</para> <attribution>John Doe</attribution> </epigraph>
The following attributes occur on all elements. They are summarized here once for brevity and to make the additional attributes that occur on many elements stand out.
| Name | Type | |||||
|---|---|---|---|---|---|---|
annotations |
text | |||||
arch |
text | |||||
audience |
text | |||||
condition |
text | |||||
conformance |
text | |||||
dir |
|
|||||
os |
text | |||||
remap |
text | |||||
revision |
text | |||||
revisionflag |
|
|||||
role |
text | |||||
security |
text | |||||
userlevel |
text | |||||
vendor |
text | |||||
version |
text | |||||
wordsize |
text | |||||
xml:base |
anyURI | |||||
xml:id |
ID | |||||
xml:lang |
text | |||||
xreflabel |
text |
annotationsIdentifies one or more annotations that apply to this element.
archDesignates the computer or chip architecture to which the element applies.
audienceDesignates the intended audience to which the element applies, for example, system administrators, programmers, or new users..
conditionprovides a standard place for application-specific effectivity.
Many DocBook users observed that in order to add an effectivity condition that was unique to their environment required “abusing” the semantics of one of the existing attributes, or adding their own, making their customization an extension rather than a subset. Thecondition attribute is a general-purpose effectivity attribute with no specified semantics.
Thecondition attribute provides a standard place for application-specific effectivity.
conformanceIndicates standards conformance characteristics of the element.
These characteristics are application-specific; DocBook provides no default semantics.
dirIdentifies the direction of text in an element.
ltrrtllrorloosIndicates the operating system to which the element is applicable.
remapProvides the name or similar semantic identifier assigned to the content in some previous markup scheme.
revisionIndicates the editorial revision to which the element belongs.
revisionflagIdentifies the revision status of the element.
changedaddeddeletedoffroleProvides additional, user-specified classification for an element.
While role is a common attribute in the sense that it occurs on all DocBook elements, customizers will find that it is not part of any of the “common attribute” patterns. It is parameterized differently because it is useful to be able to subclass role independently on different elements.
securityIndicates something about the security level associated with the element to which it applies.
userlevelIndicates the level of user experience for which the element applies.
vendorIndicates the computer vendor to which the element applies..
versionSpecifies the DocBook version of the element and its descendants.
wordsizeIndicates the word size (width in bits) of the computer architecture to which the element applies.
xml:baseSpecifies the base URI of the element and its descendants.
xml:idIdentifies the unique ID value of the element.
xml:langSpecifies the natural language of the element and its descendants.
xreflabelProvides the text that is to be generated for a cross reference to the element.
The following attributes occur on all elements that can be the start of a link. They are summarized here once for brevity and to make the additional attributes that occur on many elements stand out.
| Name | Type | ||||||
|---|---|---|---|---|---|---|---|
linkend/linkends |
IDREF/IDREFS | ||||||
xlink:actuate |
|
||||||
xlink:arcrole |
anyURI | ||||||
xlink:href |
anyURI | ||||||
xlink:role |
anyURI | ||||||
xlink:show |
|
||||||
xlink:title |
text | ||||||
xlink:type |
text |
linkend/linkendsPoints to an internal link target by identifying the value of its xml:id attribute.
xlink:actuateIdentifies the XLink actuate behavior of the link.
onLoadonRequestothernonexlink:arcroleIdentifies the XLink arcrole of the link.
xlink:hrefIdentifies a link target with a URI.
xlink:roleIdentifies the XLink role of the link.
DocBook uses the XLink role value http://docbook.org/xlink/role/olink to identify linking elements with OLink semantics. That means the part of xlink:href before the number sign (#) is to be interpreted as equivalent to the olink targetdoc attribute value, and the part after the number sign as the olink targetptr attribute value.
xlink:showIdentifies the XLink show behavior of the link.
newreplaceembedothernonexlink:titleIdentifies the XLink title of the link.
xlink:typeIdentifies the XLink link type.