4.1.1 Headings
Headings define the chapter structure for a document. A
chapter or subchapter begins with a heading and extends to the next heading at
the same or higher level.
<define name="text-h">
<element
name="text:h">
<ref
name="heading-attrs"/>
<ref
name="paragraph-attrs"/>
<optional>
<ref
name="text-number"/>
</optional>
<zeroOrMore>
<ref
name="paragraph-content"/>
</zeroOrMore>
</element>
</define>
Heading Level
The text:outline-level
attribute associated with the heading element determines the level of the
heading, starting with 1. Headings without a level attribute are assumed to be
at level 1.
<define name="heading-attrs"
combine="interleave">
<attribute
name="text:outline-level">
<ref
name="positiveInteger"/>
</attribute>
</define>
Heading Numbering
Header numbering can be changed by additional attributes,
similar to those on list items (see section 4.3.2, below). The numbering of headers
can be restarted by setting the text:restart-numbering
attribute to true.
<define name="heading-attrs"
combine="interleave">
<optional>
<attribute
name="text:restart-numbering" a:defaultValue="false">
<ref
name="boolean"/>
</attribute>
</optional>
</define>
Start Value
The attribute text:start-value
may be used to restart the numbering of headers of the current header's level,
by setting a new value for the numbering.
<define name="heading-attrs"
combine="interleave">
<optional>
<attribute
name="text:start-value">
<ref
name="nonNegativeInteger"/>
</attribute>
</optional>
</define>
Suppress Header Numbering
It is sometimes desired to have a specific heading which
should not be numbered. This corresponds to unnumbered list headers in lists
(see sections 4.3). To facilitate this, an optional attribute text:is-list-header can be used. If true, the given header will not be numbered, even if an
explicit list-style is given.
<define name="heading-attrs"
combine="interleave">
<optional>
<attribute name="text:is-list-header"
a:defaultValue="false">
<ref
name="boolean"/>
</attribute>
</optional>
</define>
Formatted Heading Number
If a heading has a numbering applied, the text of the
formatted number can be included in a <text:number>
element. This text can be used by applications that do not support numbering of
headings, but it will be ignored by applications that support numbering.
<define name="text-number">
<element
name="text:number">
<ref
name="string"/>
</element>
</define>