2
======================================================================
3
Docutils Python Source DTD
4
======================================================================
6
:Contact: goodger@users.sourceforge.net
7
:Revision: $Revision: 1.8 $
8
:Date: $Date: 2002/11/28 03:43:57 $
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
17
is available from http://docutils.sourceforge.net/spec/pysource.dtd.
19
The formal public identifier for this DTD is::
21
+//IDN docutils.sourceforge.net//DTD Docutils Python Source//EN//XML
25
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26
Parameter Entity Overrides
27
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30
<!ENTITY % additional.section.elements
31
" | package_section | module_section | class_section
32
| method_section | function_section
33
| module_attribute_section | function_attribute_section
34
| class_attribute_section | instance_attribute_section ">
36
<!ENTITY % additional.inline.elements
37
" | package | module | class | method | function
38
| variable | parameter | type | attribute
39
| module_attribute | class_attribute | instance_attribute
40
| exception_class | warning_class ">
43
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
This DTD extends the Docutils Generic DTD, available from
48
http://docutils.sourceforge.net/spec/docutils.dtd.
51
<!ENTITY % docutils PUBLIC
52
"+//IDN python.org//DTD Docutils Generic//EN//XML"
57
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58
Additional Section Elements
59
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62
<!ELEMENT package_section
63
(package, fullname?, import_list?, %structure.model;)>
64
<!ATTLIST package_section %basic.atts;>
66
<!ELEMENT module_section
67
(module, fullname?, import_list?, %structure.model;)>
68
<!ATTLIST module_section %basic.atts;>
70
<!ELEMENT class_section
71
(class, inheritance_list?, fullname?, subclasses?,
73
<!ATTLIST class_section %basic.atts;>
75
<!ELEMENT method_section
76
(method, parameter_list?, fullname?, overrides?,
78
<!ATTLIST method_section %basic.atts;>
80
<!ELEMENT function_section
81
(function, parameter_list?, fullname?, %structure.model;)>
82
<!ATTLIST function_section %basic.atts;>
84
<!ELEMENT module_attribute_section
85
(attribute, initial_value?, fullname?, %structure.model;)>
86
<!ATTLIST module_attribute_section %basic.atts;>
88
<!ELEMENT function_attribute_section
89
(attribute, initial_value?, fullname?, %structure.model;)>
90
<!ATTLIST function_attribute_section %basic.atts;>
92
<!ELEMENT class_attribute_section
93
(attribute, initial_value?, fullname?, overrides?,
95
<!ATTLIST class_attribute_section %basic.atts;>
97
<!ELEMENT instance_attribute_section
98
(attribute, initial_value?, fullname?, overrides?,
100
<!ATTLIST instance_attribute_section %basic.atts;>
104
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108
(package | module | class | method | function | attribute)+>
109
<!ATTLIST fullname %basic.atts;>
111
<!ELEMENT import_list (import_item+)>
112
<!ATTLIST import_list %basic.atts;>
115
Support ``import module``, ``import module as alias``, ``from module
116
import identifier``, and ``from module import identifier as alias``.
118
<!ELEMENT import_item (fullname, identifier?, alias?)>
119
<!ATTLIST import_item %basic.atts;>
121
<!ELEMENT inheritance_list (class+)>
122
<!ATTLIST inheritance_list %basic.atts;>
124
<!ELEMENT subclasses (class+)>
125
<!ATTLIST subclasses %basic.atts;>
127
<!ELEMENT parameter_list
128
((parameter_item+, optional_parameters*) | optional_parameters+)>
129
<!ATTLIST parameter_list %basic.atts;>
131
<!ELEMENT parameter_item
132
((parameter | parameter_tuple), parameter_default?)>
133
<!ATTLIST parameter_item %basic.atts;>
135
<!ELEMENT optional_parameters (parameter_item+, optional_parameters*)>
136
<!ATTLIST optional_parameters %basic.atts;>
138
<!ELEMENT parameter_tuple (parameter | parameter_tuple)+>
139
<!ATTLIST parameter_tuple %basic.atts;>
141
<!ELEMENT parameter_default (#PCDATA)>
142
<!ATTLIST parameter_default %basic.atts;>
144
<!ELEMENT overrides (fullname+)>
145
<!ATTLIST overrides %basic.atts;>
147
<!ELEMENT initial_value (#PCDATA)>
148
<!ATTLIST initial_value %basic.atts;>
151
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152
Additional Inline Elements
153
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156
<!-- Also used as the `package_section` identifier/title. -->
157
<!ELEMENT package (#PCDATA)>
162
<!-- Also used as the `module_section` identifier/title. -->
163
<!ELEMENT module (#PCDATA)>
169
Also used as the `class_section` identifier/title, and in the
170
`inheritance` element.
172
<!ELEMENT class (#PCDATA)>
177
<!-- Also used as the `method_section` identifier/title. -->
178
<!ELEMENT method (#PCDATA)>
183
<!-- Also used as the `function_section` identifier/title. -->
184
<!ELEMENT function (#PCDATA)>
190
??? Use this instead of the ``*_attribute`` elements below? Add a
191
"type" attribute to differentiate?
193
Also used as the identifier/title for `module_attribute_section`,
194
`class_attribute_section`, and `instance_attribute_section`.
196
<!ELEMENT attribute (#PCDATA)>
202
Also used as the `module_attribute_section` identifier/title. A module
203
attribute is an exported module-level global variable.
205
<!ELEMENT module_attribute (#PCDATA)>
206
<!ATTLIST module_attribute
210
<!-- Also used as the `class_attribute_section` identifier/title. -->
211
<!ELEMENT class_attribute (#PCDATA)>
212
<!ATTLIST class_attribute
217
Also used as the `instance_attribute_section` identifier/title.
219
<!ELEMENT instance_attribute (#PCDATA)>
220
<!ATTLIST instance_attribute
224
<!ELEMENT variable (#PCDATA)>
229
<!-- Also used in `parameter_list`. -->
230
<!ELEMENT parameter (#PCDATA)>
234
excess_positional %yesorno; #IMPLIED
235
excess_keyword %yesorno; #IMPLIED>
237
<!ELEMENT type (#PCDATA)>
242
<!ELEMENT exception_class (#PCDATA)>
243
<!ATTLIST exception_class
247
<!ELEMENT warning_class (#PCDATA)>
248
<!ATTLIST warning_class
255
indent-tabs-mode: nil