1
============================
2
The Docutils Document Tree
3
============================
5
A Guide to the Docutils DTD
6
***************************
9
:Contact: goodger@users.sourceforge.net
10
:Revision: $Revision: 1.38 $
11
:Date: $Date: 2004/05/09 13:42:21 $
12
:Copyright: This document has been placed in the public domain.
15
.. contents:: :depth: 1
18
This document describes the XML data structure of Docutils_ documents:
19
the relationships and semantics of elements and attributes. The
20
Docutils document structure is formally defined by the `Docutils
21
Generic DTD`_ XML document type definition, docutils.dtd_, which is
22
the definitive source for details of element structural relationships.
24
This document does not discuss implementation details. Those can be
25
found in internal documentation (docstrings) for the
26
``docutils.nodes`` module, where the document tree data structure is
27
implemented in a class library.
29
The reader is assumed to have some familiarity with XML or SGML, and
30
an understanding of the data structure meaning of "tree". For a list
31
of introductory articles, see `Introducing the Extensible Markup
34
The reStructuredText_ markup is used for illustrative examples
35
throughout this document. For a gentle introduction, see `A
36
ReStructuredText Primer`_. For complete technical details, see the
37
`reStructuredText Markup Specification`_.
40
.. _Docutils: http://docutils.sourceforge.net/
41
.. _Docutils Generic DTD:
43
.. _docutils.dtd: docutils.dtd
44
.. _Introducing the Extensible Markup Language (XML):
45
http://xml.coverpages.org/xmlIntro.html
46
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
47
.. _A ReStructuredText Primer: ../docs/rst/quickstart.html
48
.. _reStructuredText Markup Specification: rst/reStructuredText.html
57
Below is a simplified diagram of the hierarchy of elements in the
58
Docutils document tree structure. An element may contain any other
59
elements immediately below it in the diagram. Notes are written in
60
square brackets. Element types in parentheses indicate recursive or
61
one-to-many relationships; sections may contain (sub)sections, tables
62
contain further body elements, etc. ::
64
+--------------------------------------------------------------------+
65
| document [may begin with a title, subtitle, docinfo, decoration] |
66
| +--------------------------------------+
67
| | sections [each begins with a title] |
68
+-----------------------------+-------------------------+------------+
69
| [body elements:] | (sections) |
70
| | - literal | - lists | | - hyperlink +------------+
71
| | blocks | - tables | | targets |
72
| para- | - doctest | - block | foot- | - sub. defs |
73
| graphs | blocks | quotes | notes | - comments |
74
+---------+-----------+----------+-------+--------------+
75
| [text]+ | [text] | (body elements) | [text] |
76
| (inline +-----------+------------------+--------------+
80
The Docutils document model uses a simple, recursive model for section
81
structure. A document_ node may contain body elements and section_
82
elements. Sections in turn may contain body elements and sections.
83
The level (depth) of a section element is determined from its physical
84
nesting level; unlike other document models (``<h1>`` in HTML_,
85
``<sect1>`` in DocBook_, ``<div1>`` in XMLSpec_) the level is not
86
incorporated into the element name.
88
The Docutils document model uses strict element content models. Every
89
element has a unique structure and semantics, but elements may be
90
classified into general categories (below). Only elements which are
91
meant to directly contain text data have a mixed content model, where
92
text data and inline elements may be intermixed. This is unlike the
93
much looser HTML_ document model, where paragraphs and text data may
94
occur at the same level.
100
Structural elements may only contain child elements; they do not
101
directly contain text data. Structural elements may contain body
102
elements or further structural elements. Structural elements can only
103
be child elements of other structural elements.
105
Category members: document_, section_, topic_, sidebar_
108
Structural Subelements
109
----------------------
111
Structural subelements are child elements of structural elements.
112
Simple structuctural subelements (title_, subtitle_) contain text
113
data; the others are compound and do not directly contain text data.
115
Category members: title_, subtitle_, docinfo_, decoration_,
119
Bibliographic Elements
120
``````````````````````
122
The docinfo_ element is an optional child of document_. It groups
123
bibliographic elements together. All bibliographic elements except
124
authors_ and field_ contain text data. authors_ contains further
125
bibliographic elements (most notably author_). field_ contains
126
field_name_ and field_body_ body subelements.
128
Category members: address_, author_, authors_, contact_, copyright_,
129
date_, field_, organization_, revision_, status_, version_
135
The decoration_ element is also an optional child of document_. It
136
groups together elements used to generate page headers and footers.
138
Category members: footer_, header_
144
Body elements are contained within structural elements and compound
145
body elements. There are two subcategories of body elements: simple
148
Category members: admonition_, attention_, block_quote_, bullet_list_,
149
caution_, citation_, comment_, danger_, definition_list_,
150
doctest_block_, enumerated_list_, error_, field_list_, figure_,
151
footnote_, hint_, image_, important_, line_block_, literal_block_,
152
note_, option_list_, paragraph_, pending_, raw_, rubric_,
153
substitution_definition_, system_message_, table_, target_, tip_,
160
Simple body elements directly are empty or contain text data. Those
161
that contain text data may also contain inline elements. Such
162
elements therefore have a "mixed content model".
164
Category members: comment_, doctest_block_, image_, line_block_,
165
literal_block_, paragraph_, pending_, raw_, rubric_,
166
substitution_definition_, target_
169
Compound Body Elements
170
----------------------
172
Compound body elements contain local substructure (body subelements)
173
and further body elements. They do not directly contain text data.
175
Category members: admonition_, attention_, block_quote_, bullet_list_,
176
caution_, citation_, danger_, definition_list_, enumerated_list_,
177
error_, field_list_, figure_, footnote_, hint_, important_, note_,
178
option_list_, system_message_, table_, tip_, warning_
184
Compound body elements contain specific subelements (e.g. bullet_list_
185
contains list_item_). Subelements may themselves be compound elements
186
(containing further child elements, like field_) or simple data
187
elements (containing text data, like field_name_). These subelements
188
always occur within specific parent elements, never at the body
189
element level (beside paragraphs, etc.).
191
Category members (simple): attribution_, caption_, classifier_,
192
colspec_, field_name_, label_, option_argument_, option_string_, term_
194
Category members (compound): definition_, definition_list_item_,
195
description_, entry_, field_, field_body_, legend_, list_item_,
196
option_, option_group_, option_list_item_, row_, tbody_, tgroup_,
203
Inline elements directly contain text data, and may also contain
204
further inline elements. Inline elements are contained within simple
205
body elements. Most inline elements have a "mixed content model".
207
Category members: abbreviation_, acronym_, citation_reference_,
208
emphasis_, footnote_reference_, generated_, image_, inline_, literal_,
209
problematic_, reference_, strong_, subscript_,
210
substitution_reference_, superscript_, target_, title_reference_, raw_
213
.. _HTML: http://www.w3.org/MarkUp/
214
.. _DocBook: http://docbook.org/tdg/en/html/docbook.html
215
.. _XMLSpec: http://www.w3.org/XML/1998/06/xmlspec-report.htm
222
.. contents:: :local:
225
Each element in the DTD (document type definition) is described in its
226
own section below. Each section contains an introduction plus the
227
following subsections:
229
* Details (of element relationships and semantics):
231
- Category: One or more references to the element categories in
232
`Element Hierarchy`_ above. Some elements belong to more than one
235
- Parents: A list of elements which may contain the element.
237
- Children: A list of elements which may occur within the element.
239
- Analogues: Describes analogous elements in well-known document
240
models such as HTML_ or DocBook_. Lists similarities and
243
- Processing: Lists formatting or rendering recommendations for the
248
The formal XML content model from the `Docutils DTD`_, followed by:
250
- Attributes: Describes (or refers to descriptions of) the possible
251
values and semantics of each attribute.
253
- Parameter Entities: Lists the parameter entities which directly or
254
indirectly include the element.
256
* Examples: reStructuredText_ examples are shown along with
257
fragments of the document trees resulting from parsing.
258
_`Pseudo-XML` is used for the results of parsing and processing.
259
Pseudo-XML is a representation of XML where nesting is indicated by
260
indentation and end-tags are not shown. Some of the precision of
261
real XML is given up in exchange for easier readability. For
262
example, the following are equivalent:
267
<section id="a-title" name="a title">
268
<title>A Title</title>
269
<paragraph>A paragraph.</paragraph>
276
<section id="a-title" name="a title">
284
Many of the element reference sections below are marked "_`to be
285
completed`". Please help complete this document by contributing to
304
The ``address`` element holds the surface mailing address information
305
for the author (individual or group) of the document, or a third-party
306
contact address. Its structure is identical to that of the
307
line_block_ element: whitespace is significant, especially newlines.
314
`Bibliographic Elements`_
317
The following elements may contain ``address``: docinfo_, authors_
320
``address`` elements contain text data plus `inline elements`_.
323
``address`` is analogous to the DocBook "address" element.
326
As with the line_block_ element, newlines and other whitespace is
327
significant and must be preserved. However, a monospaced typeface
341
The ``address`` element contains the `common attributes`_ (id_,
342
name_, dupname_, source_, and class_), plus `xml:space`_.
345
The `%bibliographic.elements;`_ parameter entity directly includes
352
reStructuredText_ source::
357
:Address: 123 Example Ave.
360
Complete pseudo-XML_ result after parsing and applying transforms::
362
<document id="document-title" name="document title">
370
See docinfo_ for a more complete example, including processing
377
This element is a generic, titled admonition. Also see the specific
378
admonition elements Docutils offers (in alphabetical order): caution_,
379
danger_, error_, hint_, important_, note_, tip_, warning_.
386
`Compound Body Elements`_
389
All elements employing the `%body.elements;`_ or
390
`%structure.model;`_ parameter entities in their content models
391
may contain ``admonition``.
394
``admonition`` elements begin with a title_ and may contain one or
395
more `body elements`_.
398
``admonition`` has no direct analogues in common DTDs. It can be
399
emulated with primitives and type effects.
402
Rendered distinctly (inset and/or in a box, etc.).
410
(title_, (`%body.elements;`_)+)
413
The ``admonition`` element contains only the `common attributes`_:
414
id_, name_, dupname_, source_, and class_.
417
The `%body.elements;`_ parameter entity directly includes
418
``admonition``. The `%structure.model;`_ parameter entity
419
indirectly includes ``admonition``.
425
reStructuredText source::
427
.. admonition:: And, by the way...
429
You can make up your own admonition too.
431
Pseudo-XML_ fragment from simple parsing::
433
<admonition class="admonition-and-by-the-way">
437
You can make up your own admonition too.
443
The ``attention`` element is an admonition, a distinctive and
444
self-contained notice. Also see the other admonition elements
445
Docutils offers (in alphabetical order): caution_, danger_, error_,
446
hint_, important_, note_, tip_, warning_, and the generic admonition_.
453
`Compound Body Elements`_
456
All elements employing the `%body.elements;`_ or
457
`%structure.model;`_ parameter entities in their content models
458
may contain ``attention``.
461
``attention`` elements contain one or more `body elements`_.
464
``attention`` has no direct analogues in common DTDs. It can be
465
emulated with primitives and type effects.
468
Rendered distinctly (inset and/or in a box, etc.), with the
469
generated title "Attention!" (or similar).
477
(`%body.elements;`_)+
480
The ``attention`` element contains only the `common attributes`_:
481
id_, name_, dupname_, source_, and class_.
484
The `%body.elements;`_ parameter entity directly includes
485
``attention``. The `%structure.model;`_ parameter entity
486
indirectly includes ``attention``.
492
reStructuredText source::
494
.. Attention:: All your base are belong to us.
496
Pseudo-XML_ fragment from simple parsing::
500
All your base are belong to us.
512
The ``author`` element holds the name of the author of the document.
519
`Bibliographic Elements`_
522
The following elements may contain ``author``: docinfo_, authors_
525
``author`` elements may contain text data plus `inline elements`_.
528
``author`` is analogous to the DocBook "author" element.
542
The ``author`` element contains only the `common attributes`_:
543
id_, name_, dupname_, source_, and class_.
546
The `%bibliographic.elements;`_ parameter entity directly includes
553
reStructuredText_ source::
558
:Author: J. Random Hacker
560
Complete pseudo-XML_ result after parsing and applying transforms::
562
<document id="document-title" name="document title">
569
See docinfo_ for a more complete example, including processing
576
The ``authors`` element is a container for author information for
577
documents with multiple authors.
584
`Bibliographic Elements`_
587
Only the docinfo_ element contains ``authors``.
590
``authors`` elements may contain the following elements: author_,
591
organization_, address_, contact_
594
``authors`` is analogous to the DocBook "authors" element.
605
((author_, organization_?, address_?, contact_?)+)
608
The ``authors`` element contains only the `common attributes`_:
609
id_, name_, dupname_, source_, and class_.
612
The `%bibliographic.elements;`_ parameter entity directly includes
619
reStructuredText_ source::
624
:Authors: J. Random Hacker; Jane Doe
626
Complete pseudo-XML_ result after parsing and applying transforms::
628
<document id="document-title" name="document title">
638
In reStructuredText, multiple author's names are separated with
639
semicolons (";") or commas (","); semicolons take precedence. There
640
is currently no way to represent the author's organization, address,
641
or contact in a reStructuredText "Authors" field.
643
See docinfo_ for a more complete example, including processing
650
The ``block_quote`` element is used for quotations set off from the
651
main text (standalone).
658
`Compound Body Elements`_
661
All elements employing the `%body.elements;`_ or
662
`%structure.model;`_ parameter entities in their content models
663
may contain ``block_quote``.
666
``block_quote`` elements contain `body elements`_ followed by an
667
optional attribution_ element.
670
``block_quote`` is analogous to the "blockquote" element in both
674
``block_quote`` elements serve to set their contents off from the
675
main text, typically with indentation and/or other decoration.
683
((`%body.elements;`_)+, attribution_?)
686
The ``block_quote`` element contains only the `common
687
attributes`_: id_, name_, dupname_, source_, and class_.
690
The `%body.elements;`_ parameter entity directly includes
691
``block_quote``. The `%structure.model;`_ parameter entity
692
indirectly includes ``block_quote``.
698
reStructuredText source::
700
As a great paleontologist once said,
702
This theory, that is mine, is mine.
706
Pseudo-XML_ fragment from simple parsing::
709
As a great paleontologist once said,
712
This theory, that is mine, is mine.
720
The ``bullet_list`` element contains list_item_ elements which are
721
uniformly marked with bullets. Bullets are typically simple dingbats
722
(symbols) such as circles and squares.
729
`Compound Body Elements`_
732
All elements employing the `%body.elements;`_ or
733
`%structure.model;`_ parameter entities in their content models
734
may contain ``bullet_list``.
737
``bullet_list`` elements contain one or more list_item_ elements.
740
``bullet_list`` is analogous to the HTML "ul" element and to the
741
DocBook "itemizedlist" element. HTML's "ul" is short for
742
"unordered list", which we consider to be a misnomer. "Unordered"
743
implies that the list items may be randomly rearranged without
744
affecting the meaning of the list. Bullet lists *are* often
745
ordered; the ordering is simply left implicit.
748
Each list item should begin a new vertical block, prefaced by a
760
The ``bullet_list`` element contains the `common attributes`_
761
(id_, name_, dupname_, source_, and class_), plus bullet_.
763
``bullet`` is used to record the style of bullet from the input
764
data. In documents processed from reStructuredText_, it contains
765
one of "-", "+", or "*". It may be ignored in processing.
768
The `%body.elements;`_ parameter entity directly includes
769
``bullet_list``. The `%structure.model;`_ parameter entity
770
indirectly includes ``bullet_list``.
776
reStructuredText_ source::
778
- Item 1, paragraph 1.
784
Pseudo-XML_ fragment from simple parsing::
786
<bullet_list bullet="-">
796
See list_item_ for another example.
808
The ``caution`` element is an admonition, a distinctive and
809
self-contained notice. Also see the other admonition elements
810
Docutils offers (in alphabetical order): attention_, danger_, error_,
811
hint_, important_, note_, tip_, warning_, and the generic admonition_.
818
`Compound Body Elements`_
821
All elements employing the `%body.elements;`_ or
822
`%structure.model;`_ parameter entities in their content models
823
may contain ``caution``.
826
``caution`` elements contain one or more `body elements`_.
829
``caution`` is analogous to the DocBook "caution" element.
832
Rendered distinctly (inset and/or in a box, etc.), with the
833
generated title "Caution" (or similar).
841
(`%body.elements;`_)+
844
The ``caution`` element contains only the `common attributes`_:
845
id_, name_, dupname_, source_, and class_.
848
The `%body.elements;`_ parameter entity directly includes
849
``caution``. The `%structure.model;`_ parameter entity
850
indirectly includes ``caution``.
856
reStructuredText source::
858
.. Caution:: Don't take any wooden nickels.
860
Pseudo-XML_ fragment from simple parsing::
864
Don't take any wooden nickels.
873
``citation_reference``
874
======================
882
The ``classifier`` element contains the classification or type of the
883
term_ being defined in a definition_list_. For example, it can be
884
used to indicate the type of a variable.
891
`Body Subelements`_ (simple)
894
Only the definition_list_item_ element contains ``classifier``.
897
``classifier`` elements may contain text data plus `inline elements`_.
900
``classifier`` has no direct analogues in common DTDs. It can be
901
emulated with primitives or type effects.
904
See definition_list_item_.
915
The ``classifier`` element contains only the `common attributes`_:
916
id_, name_, dupname_, source_, and class_.
922
Here is a hypothetical data dictionary. reStructuredText_ source::
927
Temporary index variable.
929
Pseudo-XML_ fragment from simple parsing::
932
<definition_list_item>
940
<definition_list_item>
947
Temporary index variable.
965
The ``contact`` element holds contact information for the author
966
(individual or group) of the document, or a third-party contact. It
967
is typically used for an email or web address.
974
`Bibliographic Elements`_
977
The following elements may contain ``contact``: docinfo_, authors_
980
``contact`` elements may contain text data plus `inline
984
``contact`` is analogous to the DocBook "email" element. The HTML
985
"address" element serves a similar purpose.
999
The ``contact`` element contains only the `common attributes`_:
1000
id_, name_, dupname_, source_, and class_.
1002
:Parameter Entities:
1003
The `%bibliographic.elements;`_ parameter entity directly includes
1010
reStructuredText_ source::
1015
:Contact: jrh@example.com
1017
Complete pseudo-XML_ result after parsing and applying transforms::
1019
<document id="document-title" name="document title">
1024
<reference refuri="mailto:jrh@example.com">
1027
See docinfo_ for a more complete example, including processing
1034
The ``copyright`` element contains the document's copyright statement.
1041
`Bibliographic Elements`_
1044
Only the docinfo_ element contains ``copyright``.
1047
``copyright`` elements may contain text data plus `inline
1051
``copyright`` is analogous to the DocBook "copyright" element.
1065
The ``copyright`` element contains only the `common attributes`_:
1066
id_, name_, dupname_, source_, and class_.
1068
:Parameter Entities:
1069
The `%bibliographic.elements;`_ parameter entity directly includes
1076
reStructuredText_ source::
1081
:Copyright: This document has been placed in the public domain.
1083
Complete pseudo-XML_ result after parsing and applying transforms::
1085
<document id="document-title" name="document title">
1090
This document has been placed in the public domain.
1092
See docinfo_ for a more complete example, including processing
1099
The ``danger`` element is an admonition, a distinctive and
1100
self-contained notice. Also see the other admonition elements
1101
Docutils offers (in alphabetical order): attention_, caution_, error_,
1102
hint_, important_, note_, tip_, warning_, and the generic admonition_.
1109
`Compound Body Elements`_
1112
All elements employing the `%body.elements;`_ or
1113
`%structure.model;`_ parameter entities in their content models
1114
may contain ``danger``.
1117
``danger`` elements contain one or more `body elements`_.
1120
``danger`` has no direct analogues in common DTDs. It can be
1121
emulated with primitives and type effects.
1124
Rendered distinctly (inset and/or in a box, etc.), with the
1125
generated title "!DANGER!" (or similar).
1133
(`%body.elements;`_)+
1136
The ``danger`` element contains only the `common attributes`_:
1137
id_, name_, dupname_, source_, and class_.
1139
:Parameter Entities:
1140
The `%body.elements;`_ parameter entity directly includes
1141
``danger``. The `%structure.model;`_ parameter entity
1142
indirectly includes ``danger``.
1148
reStructuredText source::
1150
.. DANGER:: Mad scientist at work!
1152
Pseudo-XML_ fragment from simple parsing::
1156
Mad scientist at work!
1162
The ``date`` element contains the date of publication, release, or
1163
last modification of the document.
1170
`Bibliographic Elements`_
1173
Only the docinfo_ element contains ``date``.
1176
``date`` elements may contain text data plus `inline elements`_.
1179
``date`` is analogous to the DocBook "date" element.
1182
Often used with the RCS/CVS keyword "Date". See docinfo_.
1193
The ``date`` element contains only the `common attributes`_:
1194
id_, name_, dupname_, source_, and class_.
1196
:Parameter Entities:
1197
The `%bibliographic.elements;`_ parameter entity directly includes
1204
reStructuredText_ source::
1211
Complete pseudo-XML_ result after parsing and applying transforms::
1213
<document id="document-title" name="document title">
1220
See docinfo_ for a more complete example, including processing
1227
The ``decoration`` element is a container for header_ and footer_
1228
elements and potential future extensions. These elements are used for
1229
page navigation, notes, time/datestamp, etc. Currently only the
1230
footer_ element is implemented, populated with processing information
1231
(datestamp, a link to Docutils_, etc.).
1238
`Structural Subelements`_
1241
Only the document_ element contains ``decoration``.
1244
``decoration`` elements may contain `decorative elements`_.
1247
There are no direct analogies to ``decoration`` in HTML or in
1248
DocBook. Equivalents are typically constructed from primitives
1249
and/or generated by the processing system.
1252
See the individual `decorative elements`_.
1259
(header_?, footer_?)
1261
Although the content model doesn't specifically require contents, no
1262
empty ``decoration`` elements are ever created.
1265
The ``decoration`` element contains only the `common attributes`_:
1266
id_, name_, dupname_, source_, and class_.
1272
reStructuredText_ source::
1276
Complete pseudo-XML_ result after parsing and applying transforms,
1277
assuming that the datestamp command-line option or configuration
1278
setting has been supplied::
1284
Generated on: 2002-08-20.
1292
The ``definition`` element is a container for the body elements used
1293
to define a term_ in a definition_list_.
1300
`Body Subelements`_ (compound)
1303
Only definition_list_item_ elements contain ``definition``.
1306
``definition`` elements may contain `body elements`_.
1309
``definition`` is analogous to the HTML "dd" element and to the
1310
DocBook "listitem" element (inside a "variablelistentry" element).
1313
See definition_list_item_.
1321
(`%body.elements;`_)+
1324
The ``definition`` element contains only the `common attributes`_:
1325
id_, name_, dupname_, source_, and class_.
1331
See the examples for the definition_list_, definition_list_item_, and
1332
classifier_ elements.
1338
The ``definition_list`` element contains a list of terms and their
1339
definitions. It can be used for glossaries or dictionaries, to
1340
describe or classify things, for dialogues, or to itemize subtopics
1341
(such as in this reference).
1348
`Compound Body Elements`_
1351
All elements employing the `%body.elements;`_ or
1352
`%structure.model;`_ parameter entities in their content models
1353
may contain ``definition_list``.
1356
``definition_list`` elements contain one or more
1357
definition_list_item_ elements.
1360
``definition_list`` is analogous to the HTML "dl" element and to
1361
the DocBook "variablelist" element.
1364
See definition_list_item_.
1372
(definition_list_item_ +)
1375
The ``definition_list`` element contains only the `common
1376
attributes`_: id_, name_, dupname_, source_, and class_.
1378
:Parameter Entities:
1379
The `%body.elements;`_ parameter entity directly includes
1380
``definition_list``. The `%structure.model;`_ parameter entity
1381
indirectly includes ``definition_list``.
1387
reStructuredText_ source::
1393
The ' : ' indicates a classifier in
1394
definition list item terms only.
1396
Pseudo-XML_ fragment from simple parsing::
1399
<definition_list_item>
1405
<definition_list_item>
1412
The ' : ' indicates a classifier in
1413
definition list item terms only.
1415
See definition_list_item_ and classifier_ for further examples.
1418
``definition_list_item``
1419
========================
1421
The ``definition_list_item`` element contains a single
1422
term_/definition_ pair (with optional classifier_).
1429
`Body Subelements`_ (compound)
1432
Only the definition_list_ element contains
1433
``definition_list_item``.
1436
``definition_list_item`` elements each contain a single term_,
1437
an optional classifier_, and a definition_.
1440
``definition_list_item`` is analogous to the DocBook
1441
"variablelistentry" element.
1444
The optional classifier_ can be rendered differently from the
1445
term_. They should be separated visually, typically by spaces
1446
plus a colon or dash.
1454
(term_, classifier_?, definition_)
1457
The ``definition_list_item`` element contains only the `common
1458
attributes`_: id_, name_, dupname_, source_, and class_.
1464
reStructuredText_ source::
1466
Tyrannosaurus Rex : carnivore
1467
Big and scary; the "Tyrant King".
1469
Brontosaurus : herbivore
1470
All brontosauruses are thin at one end,
1471
much much thicker in the middle
1472
and then thin again at the far end.
1476
Pseudo-XML_ fragment from simple parsing::
1479
<definition_list_item>
1486
Big and scary; the "Tyrant King".
1487
<definition_list_item>
1494
All brontosauruses are thin at one end,
1495
much much thicker in the middle
1496
and then thin again at the far end.
1500
See definition_list_ and classifier_ for further examples.
1506
The ``description`` element contains body elements, describing the
1507
purpose or effect of a command-line option or group of options.
1517
Only the option_list_item_ element contains ``description``.
1520
``description`` elements may contain `body elements`_.
1523
``description`` has no direct analogues in common DTDs.
1534
(`%body.elements;`_)+
1537
The ``description`` element contains only the `common attributes`_:
1538
id_, name_, dupname_, source_, and class_.
1544
See the examples for the option_list_ element.
1550
The ``docinfo`` element is a container for document bibliographic
1551
data, or meta-data (data about the document). It corresponds to the
1552
front matter of a book, such as the title page and copyright page.
1559
`Structural Subelements`_
1562
Only the document_ element contains ``docinfo``.
1565
``docinfo`` elements contain `bibliographic elements`_.
1568
``docinfo`` is analogous to DocBook "info" elements ("bookinfo"
1569
etc.). There are no directly analogous HTML elements; the "meta"
1570
element carries some of the same information, albeit invisibly.
1573
The ``docinfo`` element may be rendered as a two-column table or
1574
in other styles. It may even be invisible or omitted from the
1575
processed output. Meta-data may be extracted from ``docinfo``
1576
children; for example, HTML ``<meta>`` tags may be constructed.
1578
When Docutils_ transforms a reStructuredText_ field_list_ into a
1579
``docinfo`` element (see the examples below), RCS/CVS keywords are
1580
normally stripped from simple (one paragraph) field bodies. For
1581
complete details, please see `RCS Keywords`_ in the
1582
`reStructuredText Markup Specification`_.
1584
.. _RCS Keywords: rst/reStructuredText.html#rcs-keywords
1592
(`%bibliographic.elements;`_)+
1595
The ``docinfo`` element contains only the `common attributes`_:
1596
id_, name_, dupname_, source_, and class_.
1602
Docinfo is represented in reStructuredText_ by a field_list_ in a
1603
bibliographic context: the first non-comment element of a document_,
1604
after any document title_/subtitle_. The field list is transformed
1605
into a ``docinfo`` element and its children by a transform. Source::
1610
:Author: J. Random Hacker
1611
:Contact: jrh@example.com
1613
:Status: Work In Progress
1615
:Filename: $RCSfile: doctree.txt,v $
1616
:Copyright: This document has been placed in the public domain.
1618
Complete pseudo-XML_ result after parsing and applying transforms::
1620
<document id="docinfo-example" name="docinfo example">
1627
<reference refuri="mailto:jrh@example.com">
1642
This document has been placed in the public domain.
1644
Note that "Filename" is a non-standard ``docinfo`` field, so becomes a
1645
generic ``field`` element. Also note that the "RCSfile" keyword
1646
syntax has been stripped from the "Filename" data.
1648
See field_list_ for an example in a non-bibliographic context. Also
1649
see the individual examples for the various `bibliographic elements`_.
1655
The ``doctest_block`` element is a Python-specific variant of
1656
literal_block_. It is a block of text where line breaks and
1657
whitespace are significant and must be preserved. ``doctest_block``
1658
elements are used for interactive Python interpreter sessions, which
1659
are distinguished by their input prompt: ``>>>``. They are meant to
1660
illustrate usage by example, and provide an elegant and powerful
1661
testing environment via the `doctest module`_ in the Python standard
1665
http://www.python.org/doc/current/lib/module-doctest.html
1672
`Simple Body Elements`_
1675
All elements employing the `%body.elements;`_ or
1676
`%structure.model;`_ parameter entities in their content models
1677
may contain ``doctest_block``.
1680
``doctest_block`` elements may contain text data plus `inline
1684
``doctest_block`` is analogous to the HTML "pre" element and to
1685
the DocBook "programlisting" and "screen" elements.
1688
As with literal_block_, ``doctest_block`` elements are typically
1689
rendered in a monospaced typeface. It is crucial that all
1690
whitespace and line breaks are preserved in the rendered form.
1701
The ``doctest_block`` element contains the `common attributes`_
1702
(id_, name_, dupname_, source_, and class_), plus `xml:space`_.
1704
:Parameter Entities:
1705
The `%body.elements;`_ parameter entity directly includes
1706
``doctest_block``. The `%structure.model;`_ parameter entity
1707
indirectly includes ``doctest_block``.
1713
reStructuredText source::
1715
This is an ordinary paragraph.
1717
>>> print 'this is a Doctest block'
1718
this is a Doctest block
1720
Pseudo-XML_ fragment from simple parsing::
1723
This is an ordinary paragraph.
1724
<doctest_block xml:space="preserve">
1725
>>> print 'this is a Doctest block'
1726
this is a Doctest block
1732
The ``document`` element is the root (topmost) element of the Docutils
1733
document tree. ``document`` is the direct or indirect ancestor of
1734
every other element in the tree. It encloses the entire document
1735
tree. It is the starting point for a document.
1742
`Structural Elements`_
1745
The ``document`` element has no parents.
1748
``document`` elements may contain `structural subelements`_,
1749
`structural elements`_, and `body elements`_.
1752
``document`` is analogous to the HTML "html" element and to
1753
several DocBook elements such as "book".
1765
`%structure.model;`_)
1767
Depending on the source of the data and the stage of processing, the
1768
"document" may not initially contain a "title". A document title is
1769
not directly representable in reStructuredText_. Instead, a lone
1770
top-level section may have its title promoted to become the document
1771
title_, and similarly for a lone second-level (sub)section's title to
1772
become the document subtitle_. The "docinfo_" may be transformed from
1773
an initial field_list_, and "decoration_" is usually constructed
1776
See the `%structure.model;`_ parameter entity for details of the body
1780
The ``document`` element contains only the `common attributes`_:
1781
id_, name_, dupname_, source_, and class_.
1787
reStructuredText_ source::
1794
Complete pseudo-XML_ result from simple parsing::
1797
<section id="a-title" name="a title">
1803
After applying transforms, the section title is promoted to become the
1806
<document id="a-title" name="a title">
1828
The ``enumerated_list`` element contains list_item_ elements which are
1829
uniformly marked with enumerator labels.
1836
`Compound Body Elements`_
1839
All elements employing the `%body.elements;`_ or
1840
`%structure.model;`_ parameter entities in their content models
1841
may contain ``enumerated_list``.
1844
``enumerated_list`` elements contain one or more list_item_
1848
``enumerated_list`` is analogous to the HTML "ol" element and to
1849
the DocBook "orderedlist" element.
1852
Each list item should begin a new vertical block, prefaced by a
1853
enumeration marker (such as "1.").
1864
The ``enumerated_list`` element contains the `common attributes`_
1865
(id_, name_, dupname_, source_, and class_), plus enumtype_,
1866
prefix_, suffix_, and start_.
1868
``enumtype`` is used to record the intended enumeration sequence,
1869
one of "arabic" (1, 2, 3, ...), "loweralpha" (a, b, c, ..., z),
1870
"upperalpha" (A, B, C, ..., Z), "lowerroman" (i, ii, iii, iv, ...,
1871
mmmmcmxcix [4999]), or "upperroman" (I, II, III, IV, ...,
1874
``prefix`` stores the formatting characters used before the
1875
enumerator. In documents originating from reStructuredText_ data,
1876
it will contain either "" (empty string) or "(" (left
1877
parenthesis). It may or may not affect processing.
1879
``suffix`` stores the formatting characters used after the
1880
enumerator. In documents originating from reStructuredText_ data,
1881
it will contain either "." (period) or ")" (right parenthesis).
1882
Depending on the capabilities of the output format, this attribute
1883
may or may not affect processing.
1885
``start`` contains the ordinal value of the first item in the
1886
list, in decimal. For lists beginning at value 1 ("1", "a", "A",
1887
"i", or "I"), this attribute may be omitted.
1889
:Parameter Entities:
1890
The `%body.elements;`_ parameter entity directly includes
1891
``enumerated_list``. The `%structure.model;`_ parameter entity
1892
indirectly includes ``enumerated_list``.
1898
reStructuredText_ source::
1908
Pseudo-XML_ fragment from simple parsing::
1910
<enumerated_list enumtype="arabic" prefix="" suffix=".">
1914
<enumerated_list enumtype="upperalpha" prefix="(" suffix=")">
1928
See list_item_ for another example.
1934
The ``error`` element is an admonition, a distinctive and
1935
self-contained notice. Also see the other admonition elements
1936
Docutils offers (in alphabetical order): attention_, caution_,
1937
danger_, hint_, important_, note_, tip_, warning_, and the generic
1945
`Compound Body Elements`_
1948
All elements employing the `%body.elements;`_ or
1949
`%structure.model;`_ parameter entities in their content models
1950
may contain ``error``.
1953
``error`` elements contain one or more `body elements`_.
1956
``error`` has no direct analogues in common DTDs. It can be
1957
emulated with primitives and type effects.
1960
Rendered distinctly (inset and/or in a box, etc.), with the
1961
generated title "Error" (or similar).
1969
(`%body.elements;`_)+
1972
The ``error`` element contains only the `common attributes`_: id_,
1973
name_, dupname_, source_, and class_.
1975
:Parameter Entities:
1976
The `%body.elements;`_ parameter entity directly includes
1977
``error``. The `%structure.model;`_ parameter entity indirectly
1984
reStructuredText source::
1986
.. Error:: Does not compute.
1988
Pseudo-XML_ fragment from simple parsing::
1998
The ``field`` element contains a pair of field_name_ and field_body_
2009
The following elements may contain ``field``: docinfo_,
2013
Each ``field`` element contains one field_name_ and one
2014
field_body_ element.
2017
``field`` has no direct analogues in common DTDs.
2028
(field_name_, field_body_)
2031
The ``field`` element contains only the `common attributes`_:
2032
id_, name_, dupname_, source_, and class_.
2034
:Parameter Entities:
2035
The `%bibliographic.elements;`_ parameter entity directly includes
2042
See the examples for the field_list_ and docinfo_ elements.
2048
The ``field_body`` element contains body elements. It is analogous to
2049
a database field's data.
2059
Only the field_ element contains ``field_body``.
2062
``field_body`` elements may contain `body elements`_.
2065
``field_body`` has no direct analogues in common DTDs.
2076
(`%body.elements;`_)*
2079
The ``field_body`` element contains only the `common attributes`_:
2080
id_, name_, dupname_, source_, and class_.
2086
See the examples for the field_list_ and docinfo_ elements.
2092
The ``field_list`` element contains two-column table-like structures
2093
resembling database records (label & data pairs). Field lists are
2094
often meant for further processing. In reStructuredText_, field lists
2095
are used to represent bibliographic fields (contents of the docinfo_
2096
element) and directive options.
2103
`Compound Body Elements`_
2106
All elements employing the `%body.elements;`_ or
2107
`%structure.model;`_ parameter entities in their content models
2108
may contain ``field_list``.
2111
``field_list`` elements contain one or more field_ elements.
2114
``field_list`` has no direct analogues in common DTDs. It can be
2115
emulated with primitives such as tables.
2118
A ``field_list`` is typically rendered as a two-column list, where
2119
the first column contains "labels" (usually with a colon suffix).
2120
However, field lists are often used for extension syntax or
2121
special processing. Such structures do not survive as field lists
2133
The ``field_list`` element contains only the `common attributes`_:
2134
id_, name_, dupname_, source_, and class_.
2136
:Parameter Entities:
2137
The `%body.elements;`_ parameter entity directly includes
2138
``field_list``. The `%structure.model;`_ parameter entity
2139
indirectly includes ``field_list``.
2145
reStructuredText_ source::
2150
:Parameter i: integer
2152
Pseudo-XML_ fragment from simple parsing::
2184
The ``field_name`` element contains text; it is analogous to a
2185
database field's name.
2192
`Body Subelements`_ (simple)
2195
Only the field_ element contains ``field_name``.
2198
``field_name`` elements may contain text data plus `inline elements`_.
2201
``field_name`` has no direct analogues in common DTDs.
2215
The ``field_name`` element contains only the `common attributes`_:
2216
id_, name_, dupname_, source_, and class_.
2222
See the examples for the field_list_ and docinfo_ elements.
2234
The ``footer`` element is a container element whose contents are meant
2235
to appear at the bottom of a web page, or repeated at the bottom of
2236
every printed page. Currently the ``footer`` element may contain
2237
processing information (datestamp, a link to Docutils_, etc.).
2244
`Decorative Elements`_
2247
Only the decoration_ element contains ``footer``.
2250
``footer`` elements may contain `body elements`_.
2253
There are no direct analogies to ``footer`` in HTML or DocBook.
2254
Equivalents are typically constructed from primitives and/or
2255
generated by the processing system.
2263
(`%body.elements;`_)+
2266
The ``footer`` element contains only the `common attributes`_:
2267
id_, name_, dupname_, source_, and class_.
2273
reStructuredText_ source::
2277
Complete pseudo-XML_ result after parsing and applying transforms,
2278
assuming that the datestamp command-line option or configuration
2279
setting has been supplied::
2285
Generated on: 2002-08-20.
2296
``footnote_reference``
2297
======================
2305
Docutils wraps ``generated`` elements around text that is inserted
2306
(generated) by Docutils; i.e., text that was not in the document, like
2307
section numbers inserted by the "sectnum" directive.
2315
The ``header`` element is a container element whose contents are meant
2316
to appear at the top of a web page, or at the top of every printed
2317
page. Docutils does not yet make use of the ``header`` element.
2324
`Decorative Elements`_
2327
Only the decoration_ element contains ``header``.
2330
``header`` elements may contain `body elements`_.
2333
There are no direct analogies to ``header`` in HTML or DocBook.
2334
Equivalents are typically constructed from primitives and/or
2335
generated by the processing system.
2343
(`%body.elements;`_)+
2346
The ``header`` element contains only the `common attributes`_:
2347
id_, name_, dupname_, source_, and class_.
2359
The ``hint`` element is an admonition, a distinctive and
2360
self-contained notice. Also see the other admonition elements
2361
Docutils offers (in alphabetical order): attention_, caution_,
2362
danger_, error_, important_, note_, tip_, warning_, and the generic
2370
`Compound Body Elements`_
2373
All elements employing the `%body.elements;`_ or
2374
`%structure.model;`_ parameter entities in their content models
2375
may contain ``hint``.
2378
``hint`` elements contain one or more `body elements`_.
2381
``hint`` has no direct analogues in common DTDs. It can be
2382
emulated with primitives and type effects.
2385
Rendered distinctly (inset and/or in a box, etc.), with the
2386
generated title "Hint" (or similar).
2394
(`%body.elements;`_)+
2397
The ``hint`` element contains only the `common attributes`_: id_,
2398
name_, dupname_, source_, and class_.
2400
:Parameter Entities:
2401
The `%body.elements;`_ parameter entity directly includes
2402
``hint``. The `%structure.model;`_ parameter entity indirectly
2409
reStructuredText source::
2411
.. Hint:: It's bigger than a bread box.
2413
Pseudo-XML_ fragment from simple parsing::
2417
It's bigger than a bread box.
2429
The ``important`` element is an admonition, a distinctive and
2430
self-contained notice. Also see the other admonition elements
2431
Docutils offers (in alphabetical order): attention_, caution_,
2432
danger_, error_, hint_, note_, tip_, warning_, and the generic
2440
`Compound Body Elements`_
2443
All elements employing the `%body.elements;`_ or
2444
`%structure.model;`_ parameter entities in their content models
2445
may contain ``important``.
2448
``important`` elements contain one or more `body elements`_.
2451
``important`` is analogous to the DocBook "important" element.
2454
Rendered distinctly (inset and/or in a box, etc.), with the
2455
generated title "Important" (or similar).
2463
(`%body.elements;`_)+
2466
The ``important`` element contains only the `common attributes`_:
2467
id_, name_, dupname_, source_, and class_.
2469
:Parameter Entities:
2470
The `%body.elements;`_ parameter entity directly includes
2471
``important``. The `%structure.model;`_ parameter entity
2472
indirectly includes ``important``.
2478
reStructuredText source::
2482
* Wash behind your ears.
2483
* Clean up your room.
2484
* Back up your data.
2487
Pseudo-XML_ fragment from simple parsing::
2493
Wash behind your ears.
2526
The ``line_block`` element contains a block of text where line breaks
2527
and whitespace are significant and must be preserved. ``line_block``
2528
elements are commonly used for verse and addresses. See `line_block`_
2529
for an alternative useful for program listings and interactive
2537
`Simple Body Elements`_
2540
All elements employing the `%body.elements;`_ or
2541
`%structure.model;`_ parameter entities in their content models
2542
may contain ``line_block``.
2545
``line_block`` elements may contain text data plus `inline
2549
``line_block`` is analogous to the DocBook "literallayout" element
2550
and to the HTML "pre" element (with modifications to typeface
2554
Unline ``literal_block``, ``line_block`` elements are typically
2555
rendered in an ordinary text typeface. It is crucial that all
2556
whitespace and line breaks are preserved in the rendered form.
2567
The ``line_block`` element contains the `common attributes`_ (id_,
2568
name_, dupname_, source_, and class_), plus `xml:space`_.
2570
:Parameter Entities:
2571
The `%body.elements;`_ parameter entity directly includes
2572
``line_block``. The `%structure.model;`_ parameter entity
2573
indirectly includes ``line_block``.
2579
reStructuredText uses a directive to indicate a ``line_block``.
2582
Take it away, Eric the Orchestra Leader!
2586
A one, two, a one two three four
2588
Half a bee, philosophically,
2589
must, *ipso facto*, half not be.
2590
But half the bee has got to be,
2591
*vis a vis* its entity. D'you see?
2593
But can a bee be said to be
2594
or not to be an entire bee,
2595
when half the bee is not a bee,
2596
due to some ancient injury?
2600
Pseudo-XML_ fragment from simple parsing::
2603
Take it away, Eric the Orchestra Leader!
2604
<line_block xml:space="preserve">
2605
A one, two, a one two three four
2607
Half a bee, philosophically,
2608
must, <emphasis>ipso facto</emphasis>, half not be.
2609
But half the bee has got to be,
2610
<emphasis>vis a vis</emphasis>its entity. D'you see?
2612
But can a bee be said to be
2613
or not to be an entire bee,
2614
when half the bee is not a bee,
2615
due to some ancient injury?
2623
The ``list_item`` element is a container for the elements of a list
2631
`Body Subelements`_ (compound)
2634
The bullet_list_ and enumerated_list_ elements contain
2638
``list_item`` elements may contain `body elements`_.
2641
``list_item`` is analogous to the HTML "li" element and to the
2642
DocBook "listitem" element.
2645
See bullet_list_ or enumerated_list_.
2653
(`%body.elements;`_)+
2656
The ``list_item`` element contains only the `common attributes`_:
2657
id_, name_, dupname_, source_, and class_.
2663
reStructuredText_ source::
2665
1. Outer list, item 1.
2667
* Inner list, item 1.
2668
* Inner list, item 2.
2670
2. Outer list, item 2.
2672
Pseudo-XML_ fragment from simple parsing::
2674
<enumerated_list enumtype="arabic" prefix="" suffix=".">
2678
<bullet_list bullet="*">
2689
See bullet_list_ or enumerated_list_ for further examples.
2701
The ``literal_block`` element contains a block of text where line
2702
breaks and whitespace are significant and must be preserved.
2703
``literal_block`` elements are commonly used for program listings and
2704
interactive computer sessions. See `line_block`_ for an alternative
2705
useful for verse and addresses.
2712
`Simple Body Elements`_
2715
All elements employing the `%body.elements;`_ or
2716
`%structure.model;`_ parameter entities in their content models
2717
may contain ``literal_block``.
2720
``literal_block`` elements may contain text data plus `inline
2724
``literal_block`` is analogous to the HTML "pre" element and to
2725
the DocBook "programlisting" and "screen" elements.
2728
``literal_block`` elements are typically rendered in a monospaced
2729
typeface. It is crucial that all whitespace and line breaks are
2730
preserved in the rendered form.
2741
The ``literal_block`` element contains the `common attributes`_
2742
(id_, name_, dupname_, source_, and class_), plus `xml:space`_.
2744
:Parameter Entities:
2745
The `%body.elements;`_ parameter entity directly includes
2746
``literal_block``. The `%structure.model;`_ parameter entity
2747
indirectly includes ``literal_block``.
2753
reStructuredText source::
2755
Here is a literal block::
2758
text = 'is left as-is'
2759
spaces_and_linebreaks = 'are preserved'
2760
markup_processing = None
2762
Pseudo-XML_ fragment from simple parsing::
2765
Here is a literal block:
2766
<literal_block xml:space="preserve">
2768
text = 'is left as-is'
2769
spaces_and_linebreaks = 'are preserved'
2770
markup_processing = None
2776
The ``note`` element is an admonition, a distinctive and
2777
self-contained notice. Also see the other admonition elements
2778
Docutils offers (in alphabetical order): attention_, caution_,
2779
danger_, error_, hint_, important_, tip_, warning_, and the generic
2787
`Compound Body Elements`_
2790
All elements employing the `%body.elements;`_ or
2791
`%structure.model;`_ parameter entities in their content models
2792
may contain ``note``.
2795
``note`` elements contain one or more `body elements`_.
2798
``note`` is analogous to the DocBook "note" element.
2801
Rendered distinctly (inset and/or in a box, etc.), with the
2802
generated title "Note" (or similar).
2810
(`%body.elements;`_)+
2813
The ``note`` element contains only the `common attributes`_: id_,
2814
name_, dupname_, source_, and class_.
2816
:Parameter Entities:
2817
The `%body.elements;`_ parameter entity directly includes
2818
``note``. The `%structure.model;`_ parameter entity indirectly
2825
reStructuredText source::
2827
.. Note:: Admonitions can be handy to break up a
2828
long boring technical document.
2830
Pseudo-XML_ fragment from simple parsing::
2834
Admonitions can be handy to break up a
2835
long boring technical document.
2840
The ``option`` element groups an option string together with zero or
2841
more option argument placeholders. Note that reStructuredText_
2842
currently supports only one argument per option.
2852
Only the option_group_ element contains ``option``.
2855
Each ``option`` element contains one option_string_ and zero or
2856
more option_argument_ elements.
2859
``option`` has no direct analogues in common DTDs.
2870
(option_string_, option_argument_ \*)
2873
The ``option`` element contains only the `common attributes`_:
2874
id_, name_, dupname_, source_, and class_.
2880
See the examples for the option_list_ element.
2886
The ``option_argument`` element contains placeholder text for option
2897
Only the option_ element contains ``option_argument``.
2900
``option_argument`` elements contain text data only.
2903
``option_argument`` has no direct analogues in common DTDs.
2906
The value of the "delimiter" attribute is prefixed to the
2907
``option_argument``, separating it from its option_string_ or a
2908
preceding ``option_argument``. The ``option_argument`` text is
2909
typically rendered in a monospaced typeface, possibly italicized
2910
or otherwise altered to indicate its placeholder nature.
2921
The ``option_argument`` element contains the `common attributes`_ (id_,
2922
name_, dupname_, source_, and class_), plus delimiter_.
2924
``delimiter`` contains the text preceding the ``option_argument``:
2925
either the text separating it from the option_string_ (typically
2926
either "=" or " ") or the text between option arguments (typically
2933
See the examples for the option_list_ element.
2939
The ``option_group`` element groups together one or more option_
2940
elements, all synonyms.
2950
Only the option_list_item_ element contains ``option_group``.
2953
``option_group`` elements contain one or more option_ elements.
2955
``option_group`` is an empty element and has no children.
2957
Each ``option_group`` element contains one _ and
2961
``option_group`` has no direct analogues in common DTDs.
2964
Typically option_ elements within an ``option_group`` are joined
2965
together in a comma-separated list.
2973
(option_group_, description_)
2976
The ``option_group`` element contains only the `common attributes`_:
2977
id_, name_, dupname_, source_, and class_.
2983
See the examples for the option_list_ element.
2989
Each ``option_list`` element contains a two-column list of
2990
command-line options and descriptions, documenting a program's
2998
`Compound Body Elements`_
3001
All elements employing the `%body.elements;`_ or
3002
`%structure.model;`_ parameter entities in their content models
3003
may contain ``option_list``.
3006
``option_list`` elements contain one or more option_list_item_
3010
``option_list`` has no direct analogues in common DTDs. It can be
3011
emulated with primitives such as tables.
3014
An ``option_list`` is typically rendered as a two-column list,
3015
where the first column contains option strings and arguments, and
3016
the second column contains descriptions.
3024
(option_list_item_ +)
3027
The ``option_list`` element contains only the `common attributes`_:
3028
id_, name_, dupname_, source_, and class_.
3030
:Parameter Entities:
3031
The `%body.elements;`_ parameter entity directly includes
3032
``option_list``. The `%structure.model;`_ parameter entity
3033
indirectly includes ``option_list``.
3039
reStructuredText_ source::
3041
-a command-line option "a"
3042
-1 file, --one=file, --two file
3043
Multiple options with arguments.
3045
Pseudo-XML_ fragment from simple parsing::
3055
command-line option "a"
3061
<option_argument delimiter=" ">
3066
<option_argument delimiter="=">
3071
<option_argument delimiter=" ">
3075
Multiple options with arguments.
3078
``option_list_item``
3079
====================
3081
The ``option_list_item`` element is a container for a pair of
3082
option_group_ and description_ elements.
3092
Only the option_list_ element contains ``option_list_item``.
3095
Each ``option_list_item`` element contains one option_group_ and
3096
one description_ element.
3099
``option_list_item`` has no direct analogues in common DTDs.
3110
(option_group_, description_)
3113
The ``option_list_item`` element contains only the `common attributes`_:
3114
id_, name_, dupname_, source_, and class_.
3120
See the examples for the option_list_ element.
3126
The ``option_string`` element contains the text of a command-line
3137
Only the option_ element contains ``option_string``.
3140
``option_string`` elements contain text data only.
3143
``option_string`` has no direct analogues in common DTDs.
3146
The ``option_string`` text is typically rendered in a monospaced
3158
The ``option_string`` element contains only the `common attributes`_:
3159
id_, name_, dupname_, source_, and class_.
3165
See the examples for the option_list_ element.
3171
The ``organization`` element contains the name of document author's
3172
organization, or the organization responsible for the document.
3179
`Bibliographic Elements`_
3182
Only the docinfo_ element contains ``organization``.
3185
``organization`` elements may contain text data plus `inline
3189
``organization`` is analogous to the DocBook "orgname",
3190
"corpname", or "publishername" elements.
3204
The ``organization`` element contains only the `common attributes`_:
3205
id_, name_, dupname_, source_, and class_.
3207
:Parameter Entities:
3208
The `%bibliographic.elements;`_ parameter entity directly includes
3215
reStructuredText_ source::
3220
:Organization: Humankind
3222
Complete pseudo-XML_ result after parsing and applying transforms::
3224
<document id="document-title" name="document title">
3231
See docinfo_ for a more complete example, including processing
3238
The ``paragraph`` element contains the text and inline elements of a
3239
single paragraph, a fundamental building block of documents.
3246
`Simple Body Elements`_
3249
All elements employing the `%body.elements;`_ or
3250
`%structure.model;`_ parameter entities in their content models
3251
may contain ``paragraph``.
3254
``paragraph`` elements may contain text data plus `inline
3258
``paragraph`` is analogous to the HTML "p" element and to the
3259
DocBook "para" elements.
3270
The ``paragraph`` element contains only the `common attributes`_:
3271
id_, name_, dupname_, source_, and class_.
3273
:Parameter Entities:
3274
The `%body.elements;`_ parameter entity directly includes
3275
``paragraph``. The `%structure.model;`_ parameter entity
3276
indirectly includes ``paragraph``.
3282
reStructuredText_ source::
3286
Pseudo-XML_ fragment from simple parsing::
3319
The ``revision`` element contains the revision number of the document.
3320
It can be used alone or in conjunction with version_.
3327
`Bibliographic Elements`_
3330
Only the docinfo_ element contains ``revision``.
3333
``revision`` elements may contain text data plus `inline
3337
``revision`` is analogous to but simpler than the DocBook
3338
"revision" element. It closely matches the DocBook "revnumber"
3339
element, but in a simpler context.
3342
Often used with the RCS/CVS keyword "Revision". See docinfo_.
3353
The ``revision`` element contains only the `common attributes`_:
3354
id_, name_, dupname_, source_, and class_.
3356
:Parameter Entities:
3357
The `%bibliographic.elements;`_ parameter entity directly includes
3364
reStructuredText_ source::
3372
Complete pseudo-XML_ result after parsing and applying transforms::
3374
<document id="document-title" name="document title">
3383
See docinfo_ for a more complete example, including processing
3396
rubric n. 1. a title, heading, or the like, in a manuscript,
3397
book, statute, etc., written or printed in red or otherwise
3398
distinguished from the rest of the text. ...
3400
-- Random House Webster's College Dictionary, 1991
3402
A rubric is like an informal heading that doesn't correspond to the
3403
document's structure.
3411
The ``section`` element is the main unit of hierarchy for Docutils
3412
documents. Docutils ``section`` elements are a recursive structure; a
3413
``section`` may contain other ``section`` elements, without limit.
3414
Paragraphs and other body elements may occur before a ``section``, but
3422
`Structural Elements`_
3425
The following elements may contain ``section``: document_,
3429
``section`` elements begin with a title_, and may contain `body
3430
elements`_ as well as transition_, topic_, and sidebar_ elements.
3433
``section`` is analogous to DocBook recursive "section" elements,
3434
and to HTML "div" elements combined with "h1" etc. title elements.
3443
`%structure.model;`_)
3445
See the `%structure.model;`_ parameter entity for details of the body
3449
The ``section`` element contains only the `common attributes`_:
3450
id_, name_, dupname_, source_, and class_.
3452
:Parameter Entities:
3453
The `%section.elements;`_ parameter entity directly includes
3454
``section``. The `%structure.model;`_ parameter entity indirectly
3455
includes ``section``.
3461
reStructuredText_ source::
3479
Complete pseudo-XML_ result after parsing::
3482
<section id="title-1" name="title 1">
3487
<section id="title-2" name="title 2">
3492
<section id="title-3" name="title 3">
3497
<section id="title-4" name="title 4">
3507
Sidebars are like miniature, parallel documents that occur inside
3508
other documents, providing related or reference material. A
3509
``sidebar`` is typically offset by a border and "floats" to the side
3510
of the page; the document's main text may flow around it. Sidebars
3511
can also be likened to super-footnotes; their content is outside of
3512
the flow of the document's main text.
3514
The ``sidebar`` element is a nonrecursive section_-like construct
3515
which may occur at the top level of a section_ wherever a body element
3516
(list, table, etc.) is allowed. In other words, ``sidebar`` elements
3517
cannot nest inside body elements, so you can't have a ``sidebar``
3518
inside a ``table`` or a ``list``, or inside another ``sidebar`` (or
3526
`Structural Elements`_
3529
The following elements may contain ``sidebar``: document_,
3533
``sidebar`` elements begin with a title_ and an optional subtitle_
3534
and contain `body elements`_.
3537
``sidebar`` is analogous to the DocBook "sidebar" element.
3540
A ``sidebar`` element should be set off from the rest of the
3541
document somehow, typically with a border. Sidebars typically
3542
"float" to the side of the page and the document's main text flows
3551
(title_, subtitle_?,
3552
(`%body.elements;`_)+)
3555
The ``sidebar`` element contains only the `common attributes`_:
3556
id_, name_, dupname_, source_, and class_.
3558
:Parameter Entities:
3559
The `%structure.model;`_ parameter entity directly includes
3566
The `"sidebar" directive`_ is used to create a ``sidebar`` element.
3567
reStructuredText_ source::
3570
:subtitle: If Desired
3574
Pseudo-XML_ fragment from simple parsing::
3584
.. _"sidebar" directive: rst/directives.html#sidebar
3590
The ``status`` element contains a status statement for the document,
3591
such as "Draft", "Final", "Work In Progress", etc.
3598
`Bibliographic Elements`_
3601
Only the docinfo_ element contains ``status``.
3604
``status`` elements may contain text data plus `inline elements`_.
3607
``status`` is analogous to the DocBook "status" element.
3621
The ``status`` element contains only the `common attributes`_:
3622
id_, name_, dupname_, source_, and class_.
3624
:Parameter Entities:
3625
The `%bibliographic.elements;`_ parameter entity directly includes
3632
reStructuredText_ source::
3637
:Status: Work In Progress
3639
Complete pseudo-XML_ result after parsing and applying transforms::
3641
<document id="document-title" name="document title">
3648
See docinfo_ for a more complete example, including processing
3664
``substitution_definition``
3665
===========================
3670
``substitution_reference``
3671
==========================
3679
The ``subtitle`` element stores the subtitle of a document_.
3686
`Structural Subelements`_
3689
The document_ and sidebar_ elements may contain ``subtitle``.
3692
``subtitle`` elements may contain text data plus `inline
3696
``subtitle`` is analogous to HTML header elements ("h2" etc.) and
3697
to the DocBook "subtitle" element.
3700
A document's subtitle is usually rendered smaller than its title_.
3711
The ``subtitle`` element contains only the `common attributes`_:
3712
id_, name_, dupname_, source_, and class_.
3718
reStructuredText_ source::
3729
Complete pseudo-XML_ result after parsing and applying transforms::
3731
<document id="title" name="title">
3734
<subtitle id="subtitle" name="subtitle">
3739
Note how two section levels have collapsed, promoting their titles to
3740
become the document's title and subtitle. Since there is only one
3741
structural element (document), the subsection's ``id`` and ``name``
3742
attributes are stored in the ``subtitle`` element.
3778
The ``term`` element contains a word or phrase being defined in a
3786
`Body Subelements`_ (simple)
3789
Only the definition_list_item_ element contains ``term``.
3792
``term`` elements may contain text data plus `inline elements`_.
3795
``term`` is analogous to the HTML "dt" element and to the DocBook
3799
See definition_list_item_.
3810
The ``term`` element contains only the `common attributes`_:
3811
id_, name_, dupname_, source_, and class_.
3817
See the examples for the definition_list_, definition_list_item_, and
3818
classifier_ elements.
3836
The ``tip`` element is an admonition, a distinctive and self-contained
3837
notice. Also see the other admonition elements Docutils offers (in
3838
alphabetical order): attention_, caution_, danger_, error_, hint_,
3839
important_, note_, warning_, and the generic admonition_.
3846
`Compound Body Elements`_
3849
All elements employing the `%body.elements;`_ or
3850
`%structure.model;`_ parameter entities in their content models
3851
may contain ``tip``.
3854
``tip`` elements contain one or more `body elements`_.
3857
``tip`` is analogous to the DocBook "tip" element.
3860
Rendered distinctly (inset and/or in a box, etc.), with the
3861
generated title "Tip" (or similar).
3869
(`%body.elements;`_)+
3872
The ``tip`` element contains only the `common attributes`_: id_,
3873
name_, dupname_, source_, and class_.
3875
:Parameter Entities:
3876
The `%body.elements;`_ parameter entity directly includes ``tip``.
3877
The `%structure.model;`_ parameter entity indirectly includes
3884
reStructuredText source::
3886
.. Tip:: 15% if the service is good.
3888
Pseudo-XML_ fragment from simple parsing::
3892
15% if the service is good.
3898
The ``title`` element stores the title of a document_, section_,
3899
topic_, sidebar_, or generic admonition_.
3906
`Structural Subelements`_
3909
The following elements may contain ``title``: document_, section_,
3910
topic_, sidebar_, admonition_
3913
``title`` elements may contain text data plus `inline elements`_.
3916
``title`` is analogous to HTML "title" and header ("h1" etc.)
3917
elements, and to the DocBook "title" element.
3928
The ``title`` element contains the `common attributes`_ (id_,
3929
name_, dupname_, source_, and class_), plus refid_ and auto_.
3931
``refid`` is used as a backlink to a table of contents entry.
3933
``auto`` is used to indicate (with value "1") that the ``title``
3934
has been numbered automatically.
3940
reStructuredText_ source::
3947
Pseudo-XML_ fragment from simple parsing::
3949
<section id="a-title" name="a title">
3965
The ``topic`` element is a nonrecursive section_-like construct which
3966
may occur at the top level of a section_ wherever a body element
3967
(list, table, etc.) is allowed. In other words, ``topic`` elements
3968
cannot nest inside body elements, so you can't have a ``topic`` inside
3969
a ``table`` or a ``list``, or inside another ``topic`` (or sidebar_).
3976
`Structural Elements`_
3979
The following elements may contain ``topic``: document_, section_
3982
``topic`` elements begin with a title_ and may contain `body
3986
``topic`` is analogous to the DocBook "simplesect" element.
3989
A ``topic`` element should be set off from the rest of the
3990
document somehow, such as with indentation or a border.
3999
(`%body.elements;`_)+)
4002
The ``topic`` element contains only the `common attributes`_:
4003
id_, name_, dupname_, source_, and class_.
4005
:Parameter Entities:
4006
The `%structure.model;`_ parameter entity directly includes
4013
The `"topic" directive`_ is used to create a ``topic`` element.
4014
reStructuredText_ source::
4020
Pseudo-XML_ fragment from simple parsing::
4028
.. _"topic" directive: rst/directives.html#topic
4034
The ``transition`` element is commonly seen in novels and short
4035
fiction, as a gap spanning one or more lines, with or without a type
4036
ornament such as a row of asterisks. Transitions separate other body
4037
elements, dividing a section into untitled divisions. A transition
4038
may not begin or end a section or document, nor may two transitions be
4039
immediately adjacent.
4041
See `Doctree Representation of Transitions`__ in `A Record of
4042
reStructuredText Syntax Alternatives`__.
4044
__ rst/alternatives.txt#doctree-representation-of-transitions
4045
__ rst/alternatives.txt
4052
`Structural Subelements`_
4055
The following elements may contain ``transition``: document_,
4059
``transition`` is an empty element and has no children.
4062
``transition`` is analogous to the HTML "hr" element.
4065
The ``transition`` element is typically rendered as vertical
4066
whitespace (more than that separating paragraphs), with or without
4067
a horizontal line or row of asterisks. In novels, transitions are
4068
often represented as a row of three well-spaced asterisks with
4069
vertical space above and below.
4079
The ``transition`` element has no content; it is a "point element".
4082
The ``transition`` element contains only the `common attributes`_:
4083
id_, name_, dupname_, source_, and class_.
4085
:Parameter Entities:
4086
The `%structure.model;`_ parameter entity directly includes
4093
reStructuredText_ source::
4101
Complete pseudo-XML_ result after parsing::
4114
The ``version`` element contains the version number of the document.
4115
It can be used alone or in conjunction with revision_.
4122
`Bibliographic Elements`_
4125
Only the docinfo_ element contains ``version``.
4128
``version`` elements may contain text data plus `inline
4132
``version`` may be considered analogous to the DocBook "revision",
4133
"revnumber", or "biblioid" elements.
4136
Sometimes used with the RCS/CVS keyword "Revision". See docinfo_
4148
The ``version`` element contains only the `common attributes`_:
4149
id_, name_, dupname_, source_, and class_.
4151
:Parameter Entities:
4152
The `%bibliographic.elements;`_ parameter entity directly includes
4159
reStructuredText_ source::
4166
Complete pseudo-XML_ result after parsing and applying transforms::
4168
<document id="document-title" name="document title">
4175
See docinfo_ for a more complete example, including processing
4182
The ``warning`` element is an admonition, a distinctive and
4183
self-contained notice. Also see the other admonition elements
4184
Docutils offers (in alphabetical order): attention_, caution_,
4185
danger_, error_, hint_, important_, note_, tip_.
4192
`Compound Body Elements`_
4195
All elements employing the `%body.elements;`_ or
4196
`%structure.model;`_ parameter entities in their content models
4197
may contain ``warning``.
4200
``warning`` elements contain one or more `body elements`_.
4203
``warning`` is analogous to the DocBook "warning" element.
4206
Rendered distinctly (inset and/or in a box, etc.), with the
4207
generated title "Warning" (or similar).
4215
(`%body.elements;`_)+
4218
The ``warning`` element contains only the `common attributes`_:
4219
id_, name_, dupname_, source_, and class_.
4221
:Parameter Entities:
4222
The `%body.elements;`_ parameter entity directly includes
4223
``warning``. The `%structure.model;`_ parameter entity indirectly
4224
includes ``warning``.
4230
reStructuredText source::
4232
.. WARNING:: Reader discretion is strongly advised.
4234
Pseudo-XML_ fragment from simple parsing::
4238
Reader discretion is strongly advised.
4241
---------------------
4243
---------------------
4245
.. contents:: :local:
4248
_`Common Attributes`: Through the `%basic.atts;`_ parameter entity,
4249
all elements contain the following attributes: id_, name_, dupname_,
4250
source_, and class_.
4257
Character data. ``CDATA`` attributes may contain arbitrary text.
4260
Like a ``NMTOKEN``, but it must begin with a letter (a "name
4261
production"). Identical ``ID`` values must not appear more than
4262
once in a document; i.e., ID values must uniquely identify their
4266
A reference to an ``ID`` value (a name production) of another
4270
One or more space-separated ``ID`` references (name productions).
4273
A "name token". One or more of letters, digits, ".", "-", and
4277
One or more space-separated ``NMTOKEN`` names.
4280
No if zero ("0"), yes if any other value. This is a parameter
4281
entity which resolves to a ``NMTOKEN`` attribute type.
4284
This emphasizes that the attribute value must be a number. This
4285
is a parameter entity which resolves to a ``NMTOKEN`` attribute
4289
The attribute value may be one of a specified list of values.
4295
`Attribute type`_: ``%yesorno;``. Default value: none (implies no).
4297
The ``anonymous`` attribute is used for unnamed hyperlinks in the
4298
target_ and reference_ elements (via the `%anonymous.att;`_ parameter
4305
`Attribute type`_: ``CDATA``. Default value: none.
4307
The ``auto`` attribute is used to indicate automatically-numbered
4308
footnote_, footnote_reference_ and title_ elements (via the
4309
`%auto.att;`_ parameter entity).
4315
`Attribute type`_: ``IDREFS``. Default value: none.
4317
The ``backrefs`` attribute contains a space-separated list of id_
4318
references, used for backlinks from footnote_, citation_, and
4319
system_message_ elements (via the `%backrefs.att;`_ parameter entity).
4325
`Attribute type`_: ``CDATA``. Default value: none.
4327
The ``bullet`` attribute is used in the bullet_list_ element.
4333
`Attribute type`_: ``NMTOKENS``. Default value: none.
4335
The ``class`` attribute contains one or more names used to classify an
4336
element. The purpose of the attribute is to indicate an "is-a"
4337
variant relationship, to allow an extensible way of defining
4338
sub-classes of existing elements. It can be used to carry context
4339
forward between a Docutils Reader and Writer, when a custom structure
4340
is reduced to a standardized document tree. One common use is in
4341
conjunction with stylesheets, to add selection criteria. It should
4342
not be used to carry formatting instructions or arbitrary content.
4344
The ``class`` attribute's contents should be ignorable. Writers that
4345
are not familiar with the variant expressed should be able to ignore
4348
``class`` is one of the `common attributes`_, shared by all Docutils
4355
`Attribute type`_: ``CDATA``. Default value: none.
4357
The ``delimiter`` attribute is used in the option_argument_ element.
4363
`Attribute type`_: ``NMTOKENS``. Default value: none.
4365
The ``dupname`` attribute contains the name of an element when there
4366
has been a naming conflict. The contents of the ``dupname`` attribute
4367
would have been transferred from the `name`_ attribute. An element
4368
may have at most one of the ``name`` or ``dupname`` attributes, but
4369
not both. ``dupname`` is one of the `common attributes`_, shared by
4370
all Docutils elements.
4376
`Attribute type`_: enumeration, one of "arabic", "loweralpha",
4377
"upperalpha", "lowerroman", or "upperroman". Default value: none.
4379
The ``enumtype`` attribute is used in the enumerated_list_ element.
4385
`Attribute type`_: ``ID``. Default value: none.
4387
The ``id`` attribute contains a unique identifier key. ``id`` is one
4388
of the `common attributes`_, shared by all Docutils elements.
4394
`Attribute type`_: ``NMTOKENS``. Default value: none.
4396
The ``name`` attribute contains the name of an element, typically
4397
originating from the element's title or content. ``name`` must be
4398
unique; if there are name conflicts (two or more elements want to the
4399
same name), the contents will be transferred to the `dupname`_
4400
attribute on the duplicate elements. An element may have at most one
4401
of the ``name`` or ``dupname`` attributes, but not both. ``name`` is
4402
one of the `common attributes`_, shared by all Docutils elements.
4408
`Attribute type`_: ``CDATA``. Default value: none.
4410
The ``prefix`` attribute is used in the enumerated_list_ element.
4416
`Attribute type`_: ``IDREF``. Default value: none.
4418
The ``refid`` attribute contains references to `id`_ attributes in
4419
other elements. It is used by the target_, reference_,
4420
footnote_reference_, citation_reference_, title_ and problematic_
4421
elements (via the `%refid.att;`_ and `%reference.atts;`_ parameter
4428
`Attribute type`_: ``NMTOKENS``. Default value: none.
4430
The ``refname`` attribute contains an internal reference to the
4431
`name`_ attribute of another element. On a `target`_ element,
4432
``refname`` indicates an indirect target which may resolve to either
4433
an internal or external reference. ``refname`` is used by the
4434
target_, reference_, footnote_reference_, citation_reference_, and
4435
substitution_reference_ elements (via the `%refname.att;`_ and
4436
`%reference.atts;`_ parameter entities).
4442
`Attribute type`_: ``CDATA``. Default value: none.
4444
The ``refuri`` attribute contains an external reference to a URI/URL.
4445
It is used by the target_, reference_, footnote_reference_, and
4446
citation_reference_ elements (via the `%reference.atts;`_ parameter
4453
`Attribute type`_: ``CDATA``. Default value: none.
4455
The ``source`` attribute is used to store the path or URL to the
4456
source text that was used to produce the document tree. It is one of
4457
the `common attributes`_, shared by all Docutils elements.
4463
`Attribute type`_: ``%number;``. Default value: none.
4465
The ``start`` attribute is used in the enumerated_list_ element.
4471
`Attribute type`_: ``CDATA``. Default value: none.
4473
The ``suffix`` attribute is used in the enumerated_list_ element.
4479
`Attribute type`_: one of "default" or "preserve". Default value:
4482
The ``xml:space`` attribute is a standard XML attribute for
4483
whitespace-preserving elements. It is used by the literal_block_,
4484
line_block_, doctest_block_, comment_, and raw_ elements (via the
4485
`%fixedspace.att;`_ parameter entity). It is a fixed attribute, meant
4486
to communicate to an XML parser that the element contains significant
4487
whitespace. The attribute value should not be set in a document
4491
----------------------------
4492
Parameter Entity Reference
4493
----------------------------
4495
.. contents:: :local:
4498
Parameter entities are used to simplify the DTD (to share definitions
4499
and reduce duplication) and to allow the DTD to be customized by
4500
wrapper DTDs (external client DTDs that use or import the Docutils
4501
DTD). Parameter entities may be overridden by wrapper DTDs, replacing
4502
the definitions below with custom definitions. Parameter entities
4503
whose names begin with "additional" are meant to allow easy extension
4510
The ``%anonymous.att;`` parameter entity contains the anonymous_
4511
attribute, used for unnamed hyperlinks.
4517
anonymous_ %yesorno; #IMPLIED
4519
The reference_ and target_ elements directly employ the
4520
``%anonymous.att;`` parameter entity in their attribute lists.
4526
The ``%auto.att;`` parameter entity contains the auto_ attribute, used
4527
to indicate an automatically-numbered footnote or title.
4533
auto_ CDATA #IMPLIED
4535
The footnote_, footnote_reference_, and title_ elements directly
4536
employ the ``%auto.att;`` parameter entity in their attribute lists.
4542
The ``%backrefs.att;`` parameter entity contains the backrefs_
4543
attribute, a space-separated list of id references, for backlinks.
4549
backrefs_ IDREFS #IMPLIED
4551
The citation_, footnote_, and system_message_ elements directly employ
4552
the ``%backrefs.att;`` parameter entity in their attribute lists.
4558
The ``%basic.atts;`` parameter entity lists attributes common to all
4559
Docutils elements. See `Common Attributes`_.
4566
name_ NMTOKENS #IMPLIED
4567
dupname_ NMTOKENS #IMPLIED
4568
source_ CDATA #IMPLIED
4569
class_ NMTOKENS #IMPLIED
4570
%additional.basic.atts;
4572
The ``%additional.basic.atts;`` parameter entity can be used by
4573
wrapper DTDs to extend ``%basic.atts;``.
4576
``%bibliographic.elements;``
4577
============================
4579
The ``%bibliographic.elements;`` parameter entity contains an OR-list of all
4580
`bibliographic elements`_.
4586
author_ | authors_ | organization_ | contact_ | address_
4587
| version_ | revision_ | status_ | date_ | copyright_
4589
%additional.bibliographic.elements;
4591
The ``%additional.bibliographic.elements;`` parameter entity can be used by
4592
wrapper DTDs to extend ``%bibliographic.elements;``.
4594
Only the docinfo_ element directly employs the
4595
``%bibliographic.elements;`` parameter entity in its content model.
4601
The ``%body.elements;`` parameter entity contains an OR-list of all
4602
`body elements`_. ``%body.elements;`` is itself contained within the
4603
`%structure.model;`_ parameter entity.
4609
paragraph_ | literal_block_ | doctest_block_ | line_block_
4610
| block_quote_ | table_ | figure_ | image_ | footnote_ | citation_
4612
| bullet_list_ | enumerated_list_ | definition_list_ | field_list_
4614
| attention_ | caution_ | danger_ | error_ | hint_ | important_
4615
| note_ | tip_ | warning_ | admonition_
4616
| target_ | substitution_definition_ | comment_ | pending_
4617
| system_message_ | raw_
4618
%additional.body.elements;
4620
The ``%additional.body.elements;`` parameter entity can be used by
4621
wrapper DTDs to extend ``%body.elements;``.
4623
The ``%body.elements;`` parameter entity is directly employed in the
4624
content models of the following elements: admonition_, attention_,
4625
block_quote_, caution_, citation_, danger_, definition_, description_,
4626
entry_, error_, field_body_, footer_, footnote_, header_, hint_,
4627
important_, legend_, list_item_, note_, sidebar_, system_message_,
4628
tip_, topic_, warning_
4630
Via `%structure.model;`_, the ``%body.elements;`` parameter entity is
4631
indirectly employed in the content models of the document_ and
4635
``%fixedspace.att;``
4636
====================
4638
The ``%fixedspace.att;`` parameter entity contains the `xml:space`_
4639
attribute, a standard XML attribute for whitespace-preserving
4646
`xml:space`_ (default | preserve) #FIXED 'preserve'
4648
The ``%fixedspace.att;`` parameter entity is directly employed in the
4649
attribute lists of the following elements: address_, comment_,
4650
doctest_block_, line_block_, literal_block_, raw_
4653
``%inline.elements;``
4654
=====================
4656
The ``%inline.elements;`` parameter entity contains an OR-list of all
4663
emphasis_ | strong_ | literal_
4664
| reference_ | footnote_reference_ | citation_reference_
4665
| substitution_reference_ | title_reference_
4666
| abbreviation_ | acronym_ | subscript_ | superscript_
4667
| inline_ | problematic_ | generated_
4668
| target_ | image_ | raw_
4669
%additional.inline.elements;
4671
The ``%additional.inline.elements;`` parameter entity can be used by
4672
wrapper DTDs to extend ``%inline.elements;``.
4674
Via `%text.model;`_, the ``%inline.elements;`` parameter entity is
4675
indirectly employed in the content models of the following elements:
4676
abbreviation_, acronym_, address_, attribution_, author_, caption_,
4677
classifier_, contact_, copyright_, date_, doctest_block_, emphasis_,
4678
generated_, inline_, line_block_, literal_block_, organization_,
4679
paragraph_, problematic_, raw_, reference_, revision_, rubric_,
4680
status_, strong_, subscript_, substitution_definition_,
4681
substitution_reference_, subtitle_, superscript_, target_, term_,
4682
title_, title_reference_, version_
4685
``%reference.atts;``
4686
====================
4688
The ``%reference.atts;`` parameter entity groups together the refuri_,
4689
refid_, and refname_ attributes.
4698
%additional.reference.atts;
4700
The ``%additional.reference.atts;`` parameter entity can be used by
4701
wrapper DTDs to extend ``%additional.reference.atts;``.
4703
The citation_reference_, footnote_reference_, reference_, and target_
4704
elements directly employ the ``%reference.att;`` parameter entity in
4705
their attribute lists.
4711
The ``%refid.att;`` parameter entity contains the refid_ attribute, an
4712
internal reference to the `id`_ attribute of another element.
4718
refid_ CDATA #IMPLIED
4720
The title_ and problematic_ elements directly employ the
4721
``%refid.att;`` parameter entity in their attribute lists.
4723
Via `%reference.atts;`_, the ``%refid.att;`` parameter entity is
4724
indirectly employed in the attribute lists of the citation_reference_,
4725
footnote_reference_, reference_, and target_ elements.
4731
The ``%refname.att;`` parameter entity contains the refname_
4732
attribute, an internal reference to the `name`_ attribute of another
4733
element. On a `target`_ element, ``refname`` indicates an indirect
4734
target which may resolve to either an internal or external
4741
refname_ NMTOKENS #IMPLIED
4743
The substitution_reference_ element directly employs the
4744
``%refname.att;`` parameter entity in its attribute list.
4746
Via `%reference.atts;`_, the ``%refname.att;`` parameter entity is
4747
indirectly employed in the attribute lists of the citation_reference_,
4748
footnote_reference_, reference_, and target_ elements.
4754
The ``%refuri.att;`` parameter entity contains the refuri_ attribute,
4755
an external reference to a URI/URL.
4761
refuri_ CDATA #IMPLIED
4763
Via `%reference.atts;`_, the ``%refuri.att;`` parameter entity is
4764
indirectly employed in the attribute lists of the citation_reference_,
4765
footnote_reference_, reference_, and target_ elements.
4768
``%section.elements;``
4769
======================
4771
The ``%section.elements;`` parameter entity contains an OR-list of all
4772
section_-equivalent elements. ``%section.elements;`` is itself
4773
contained within the `%structure.model;`_ parameter entity.
4780
%additional.section.elements;
4782
The ``%additional.section.elements;`` parameter entity can be used
4783
by wrapper DTDs to extend ``%section.elements;``.
4785
Via `%structure.model;`_, the ``%section.elements;`` parameter entity
4786
is indirectly employed in the content models of the document_ and
4790
``%structure.model;``
4791
=====================
4793
The ``%structure.model;`` parameter entity encapsulates the
4794
hierarchical structure of a document and of its constituent parts.
4795
See the discussion of the `element hierarchy`_ above.
4801
( ( (`%body.elements;`_ | topic_ | sidebar_)+,
4802
(transition_, (`%body.elements;`_ | topic_ | sidebar_)+ )*,
4803
(`%section.elements;`_)* )
4804
| (`%section.elements;`_)+ )
4806
Each document_ or section_ contains either:
4808
- multiple body elements, topics, and/or sidebars, optionally
4809
interspersed with transitions (but transitions cannot occur at the
4810
beginning or end, nor may there be two transitions in a row),
4811
followed by zero or more sections; or
4813
- one or more sections (whose contents are recursively the same as this
4816
The `%structure.model;`_ parameter entity is directly employed in the
4817
content models of the document_ and section_ elements.
4823
The ``%text.model;`` parameter entity is used by many elements to
4824
represent text data mixed with `inline elements`_.
4830
(#PCDATA | `%inline.elements;`_)*
4832
The ``%text.model;`` parameter entity is directly employed in the
4833
content models of the following elements: abbreviation_, acronym_,
4834
address_, author_, caption_, classifier_, contact_, copyright_, date_,
4835
doctest_block_, emphasis_, field_name_, generated_, line_block_,
4836
literal_block_, organization_, paragraph_, problematic_, raw_,
4837
reference_, revision_, status_, strong_, substitution_definition_,
4838
substitution_reference_, subtitle_, target_, term_, title_, version_
4845
indent-tabs-mode: nil
4846
sentence-end-double-space: t