DocBook Element Reference

$Revision$

This reference describes every element in DocBook V5.0.

1. Organization of Reference Pages

The description of each element in this reference is divided into the following sections:

Synopsis

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:

Content Model

Describes the content model of the element, the mixture of things that it can contain. See Section 1.1, “Understanding Content Models”.

Attributes

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.

Additional Constraints

Provides a synopsis of any additional constraints on the element. These constraints are expressed using Schematron in the RELAX NG grammar.

Description

Describes the semantics of the element.

Processing expectations

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.

Future changes

Identifies changes that are scheduled for future versions of the schema. These changes are highlighted because they involve some backward incompatibility that may make currently valid DocBook documents no longer valid under the new version.

Attributes

Describes the semantics of each attribute.

See Also

Lists similar or related elements.

Examples

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 in the book are valid according to the RELAX NG grammar.

Formatted examples are indicated using a vertical bar.

1.1. Understanding Content Models

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.

1.1.1. Content models and validity

A validator 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:

epigraph ::= (info?db.titleforbidden.info, attribution?,(literallayout | Paragraph elements)+)

Does the following example “match” that content model?

<epigraph>
<para>Some text</para>
</epigraph>

Yes, it is valid because the following expansion of the content model exactly matches the actual content: choose zero occurrences of info, choose zero occurrences of attribution, choose the alternative para from the “Paragraph elements” 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>

2. Common Attributes

There are many “common attributes” that occur on every DocBook element. They are summarized here for brevity and to make the additional attributes that occur on many elements stand out.

NameType
annotationstext
dirsimplelist0Simple list
Enumeration:
ltr
rtl
lro
rlo
remaptext
revisionflagsimplelist0Simple list
Enumeration:
changed
added
deleted
off
roletext
versiontext
xml:baseanyURI
xml:idID
xml:langtext
xreflabeltext
annotations

Identifies one or more annotations that apply to this element.

dir

Identifies the direction of text in an element.

ltr

Left-to-right text

rtl

Right-to-left text

lro

Left-to-right override

rlo

Right-to-left override

remap

Provides the name or similar semantic identifier assigned to the content in some previous markup scheme.

revisionflag

Identifies the revision status of the element.

changed

The element has been changed.

added

The element is new (has been added to the document).

deleted

The element has been deleted.

off

Explicitly turns off revision markup for this element.

role

Provides 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.

version

Specifies the DocBook version of the element and its descendants.

xml:base

Specifies the base URI of the element and its descendants.

xml:id

Identifies the unique ID value of the element.

xml:lang

Specifies the natural language of the element and its descendants.

xreflabel

Provides the text that is to be generated for a cross reference to the element.

2.1. Common Effectivity Attributes

The common attributes include a collection of “effectivity attributes.” These attributes are available for authors to identify to whom a particular element applies. Effectivity attributes are often used for profiling: building documents that contain information only relevant to a particular audience.

For example, a section might be identified as available only to readers with a “top-secretsecurity clearance or a paragraph might be identified as affecting only users running the implementation provided by a particular vendor.

NameType
archtext
audiencetext
conditiontext
conformancetext
ostext
outputformattext
revisiontext
securitytext
userleveltext
vendortext
wordsizetext
arch

Designates the computer or chip architecture to which the element applies.

audience

Designates the intended audience to which the element applies, for example, system administrators, programmers, or new users..

condition

provides 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.

conformance

Indicates standards conformance characteristics of the element.

These characteristics are application-specific; DocBook provides no default semantics.

os

Indicates the operating system to which the element is applicable.

outputformat

Indicates the output format (for example, print or epub) to which the element applies.

revision

Indicates the editorial revision to which the element belongs.

security

Indicates something about the security level associated with the element to which it applies.

userlevel

Indicates the level of user experience for which the element applies.

vendor

Indicates the computer vendor to which the element applies..

wordsize

Indicates the word size (width in bits) of the computer architecture to which the element applies.

The names of the effectivity attributes are suggestive of several classes of common effectivity information. The semantically neutral condition attribute was added to give authors a place to put values that don’t fit neatly into one of the other alternatives.

In authoring environments where many different kinds of effectivity information are required, it’s not uncommon to see local extensions that add new attributes. It’s also not uncommon to see attributes used without regard to the class of information suggested by the name.

2.2. Common RDFa Lite Attributes

The RDFa Lite attributes incorporate support for RDFa into DocBook.

NameType
prefixtext
propertytext
resourcetext
typeoftext
vocabanyURI
prefix

The RDFa Lite prefix.

property

The RDFa Lite property.

resource

The RDFa Lite resource.

typeof

The RDFa Lite typeof.

vocab

The RDFa Lite vocab.

See RDFa Lite 1.1 for more details about the RDFa Lite attributes.

3. Common Linking Attributes

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.

NameType
linkend/ linkends IDREF/IDREFS
xlink:actuatesimplelist0Simple list
Enumeration:
onLoad
onRequest
other
none
xlink:arcroleanyURI
xlink:fromNMTOKEN
xlink:hrefanyURI
xlink:labelNMTOKEN
xlink:roleanyURI
xlink:showsimplelist0Simple list
Enumeration:
new
replace
embed
other
none
xlink:titletext
xlink:toNMTOKEN
xlink:typetext
linkend/ linkends

Points to an internal link target by identifying the value of its xml:id attribute.

xlink:actuate

Identifies the XLink actuate behavior of the link.

onLoad

An application should traverse to the ending resource immediately on loading the starting resource.

onRequest

An application should traverse from the starting resource to the ending resource only on a post-loading event triggered for the purpose of traversal.

other

The behavior of an application traversing to the ending resource is unconstrained by this specification. The application should look for other markup present in the link to determine the appropriate behavior.

none

The behavior of an application traversing to the ending resource is unconstrained by this specification. No other markup is present to help the application determine the appropriate behavior.

xlink:arcrole

Identifies the XLink arcrole of the link.

xlink:from

Specifies the XLink traversal-from.

xlink:href

Identifies a link target with a URI.

xlink:label

Specifies the XLink label.

xlink:role

Identifies 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:show

Identifies the XLink show behavior of the link.

new

An application traversing to the ending resource should load it in a new window, frame, pane, or other relevant presentation context.

replace

An application traversing to the ending resource should load the resource in the same window, frame, pane, or other relevant presentation context in which the starting resource was loaded.

embed

An application traversing to the ending resource should load its presentation in place of the presentation of the starting resource.

other

The behavior of an application traversing to the ending resource is unconstrained by XLink. The application should look for other markup present in the link to determine the appropriate behavior.

none

The behavior of an application traversing to the ending resource is unconstrained by this specification. No other markup is present to help the application determine the appropriate behavior.

xlink:title

Identifies the XLink title of the link.

xlink:to

Specifies the XLink traversal-to.

xlink:type

Identifies the XLink link type.