2
======================================================================
3
Docutils Python Source DTD
4
======================================================================
6
:Contact: goodger@users.sourceforge.net
7
:Revision: $Revision: 2223 $
8
:Date: $Date: 2004-06-05 21:32:15 +0200 (Sat, 05 Jun 2004) $
9
:Copyright: This DTD has been placed in the public domain.
10
:Filename: pysource.dtd
12
This DTD (document type definition) extends the Generic DTD (see
15
More information about this DTD and the Docutils project can be found
16
at http://docutils.sourceforge.net/. The latest version of this DTD
18
http://docutils.sourceforge.net/docs/dev/pysource.dtd.
20
The formal public identifier for this DTD is::
22
+//IDN docutils.sourceforge.net//DTD Docutils Python Source//EN//XML
26
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27
Parameter Entity Overrides
28
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
<!ENTITY % additional.section.elements
32
" | package_section | module_section | class_section
33
| method_section | function_section
34
| module_attribute_section | function_attribute_section
35
| class_attribute_section | instance_attribute_section ">
37
<!ENTITY % additional.inline.elements
38
" | package | module | class | method | function
39
| variable | parameter | type | attribute
40
| module_attribute | class_attribute | instance_attribute
41
| exception_class | warning_class ">
44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
This DTD extends the Docutils Generic DTD, available from
49
http://docutils.sourceforge.net/docs/ref/docutils.dtd.
52
<!ENTITY % docutils PUBLIC
53
"+//IDN python.org//DTD Docutils Generic//EN//XML"
58
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59
Additional Section Elements
60
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
<!ELEMENT package_section
64
(package, fullname?, import_list?, %structure.model;)>
65
<!ATTLIST package_section %basic.atts;>
67
<!ELEMENT module_section
68
(module, fullname?, import_list?, %structure.model;)>
69
<!ATTLIST module_section %basic.atts;>
71
<!ELEMENT class_section
72
(class, inheritance_list?, fullname?, subclasses?,
74
<!ATTLIST class_section %basic.atts;>
76
<!ELEMENT method_section
77
(method, parameter_list?, fullname?, overrides?,
79
<!ATTLIST method_section %basic.atts;>
81
<!ELEMENT function_section
82
(function, parameter_list?, fullname?, %structure.model;)>
83
<!ATTLIST function_section %basic.atts;>
85
<!ELEMENT module_attribute_section
86
(attribute, initial_value?, fullname?, %structure.model;)>
87
<!ATTLIST module_attribute_section %basic.atts;>
89
<!ELEMENT function_attribute_section
90
(attribute, initial_value?, fullname?, %structure.model;)>
91
<!ATTLIST function_attribute_section %basic.atts;>
93
<!ELEMENT class_attribute_section
94
(attribute, initial_value?, fullname?, overrides?,
96
<!ATTLIST class_attribute_section %basic.atts;>
98
<!ELEMENT instance_attribute_section
99
(attribute, initial_value?, fullname?, overrides?,
101
<!ATTLIST instance_attribute_section %basic.atts;>
105
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109
(package | module | class | method | function | attribute)+>
110
<!ATTLIST fullname %basic.atts;>
112
<!ELEMENT import_list (import_item+)>
113
<!ATTLIST import_list %basic.atts;>
116
Support ``import module``, ``import module as alias``, ``from module
117
import identifier``, and ``from module import identifier as alias``.
119
<!ELEMENT import_item (fullname, identifier?, alias?)>
120
<!ATTLIST import_item %basic.atts;>
122
<!ELEMENT inheritance_list (class+)>
123
<!ATTLIST inheritance_list %basic.atts;>
125
<!ELEMENT subclasses (class+)>
126
<!ATTLIST subclasses %basic.atts;>
128
<!ELEMENT parameter_list
129
((parameter_item+, optional_parameters*) | optional_parameters+)>
130
<!ATTLIST parameter_list %basic.atts;>
132
<!ELEMENT parameter_item
133
((parameter | parameter_tuple), parameter_default?)>
134
<!ATTLIST parameter_item %basic.atts;>
136
<!ELEMENT optional_parameters (parameter_item+, optional_parameters*)>
137
<!ATTLIST optional_parameters %basic.atts;>
139
<!ELEMENT parameter_tuple (parameter | parameter_tuple)+>
140
<!ATTLIST parameter_tuple %basic.atts;>
142
<!ELEMENT parameter_default (#PCDATA)>
143
<!ATTLIST parameter_default %basic.atts;>
145
<!ELEMENT overrides (fullname+)>
146
<!ATTLIST overrides %basic.atts;>
148
<!ELEMENT initial_value (#PCDATA)>
149
<!ATTLIST initial_value %basic.atts;>
152
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153
Additional Inline Elements
154
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157
<!-- Also used as the `package_section` identifier/title. -->
158
<!ELEMENT package (#PCDATA)>
163
<!-- Also used as the `module_section` identifier/title. -->
164
<!ELEMENT module (#PCDATA)>
170
Also used as the `class_section` identifier/title, and in the
171
`inheritance` element.
173
<!ELEMENT class (#PCDATA)>
178
<!-- Also used as the `method_section` identifier/title. -->
179
<!ELEMENT method (#PCDATA)>
184
<!-- Also used as the `function_section` identifier/title. -->
185
<!ELEMENT function (#PCDATA)>
191
??? Use this instead of the ``*_attribute`` elements below? Add a
192
"type" attribute to differentiate?
194
Also used as the identifier/title for `module_attribute_section`,
195
`class_attribute_section`, and `instance_attribute_section`.
197
<!ELEMENT attribute (#PCDATA)>
203
Also used as the `module_attribute_section` identifier/title. A module
204
attribute is an exported module-level global variable.
206
<!ELEMENT module_attribute (#PCDATA)>
207
<!ATTLIST module_attribute
211
<!-- Also used as the `class_attribute_section` identifier/title. -->
212
<!ELEMENT class_attribute (#PCDATA)>
213
<!ATTLIST class_attribute
218
Also used as the `instance_attribute_section` identifier/title.
220
<!ELEMENT instance_attribute (#PCDATA)>
221
<!ATTLIST instance_attribute
225
<!ELEMENT variable (#PCDATA)>
230
<!-- Also used in `parameter_list`. -->
231
<!ELEMENT parameter (#PCDATA)>
235
excess_positional %yesorno; #IMPLIED
236
excess_keyword %yesorno; #IMPLIED>
238
<!ELEMENT type (#PCDATA)>
243
<!ELEMENT exception_class (#PCDATA)>
244
<!ATTLIST exception_class
248
<!ELEMENT warning_class (#PCDATA)>
249
<!ATTLIST warning_class
256
indent-tabs-mode: nil