summaryrefslogtreecommitdiff
path: root/docs/dev/pysource.dtd
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2002-08-23 01:56:39 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2002-08-23 01:56:39 +0000
commit1fa03498559ca37ceb95791249d5ab9e9822d3a6 (patch)
tree6d94aa79e98d42bb8e931a6e4f324297372e9c2c /docs/dev/pysource.dtd
parentd9faf1c32ef0b10c560807747bf5212969658bf7 (diff)
downloaddocutils-1fa03498559ca37ceb95791249d5ab9e9822d3a6.tar.gz
working out some ideas
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@580 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docs/dev/pysource.dtd')
-rw-r--r--docs/dev/pysource.dtd43
1 files changed, 34 insertions, 9 deletions
diff --git a/docs/dev/pysource.dtd b/docs/dev/pysource.dtd
index 758ce05bc..bb61fb2ff 100644
--- a/docs/dev/pysource.dtd
+++ b/docs/dev/pysource.dtd
@@ -34,7 +34,7 @@ The proposed formal public identifier for this DTD is::
<!ENTITY % additional.inline.elements
" | package | module | class | method | function
- | variable | parameter | type
+ | variable | parameter | type | attribute
| module_attribute | class_attribute | instance_attribute
| exception_class | warning_class ">
@@ -58,10 +58,12 @@ http://docutils.sourceforge.net/spec/docutils.dtd.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
-<!ELEMENT package_section (package, fullname?, %structure.model;)>
+<!ELEMENT package_section
+ (package, fullname?, import_list?, %structure.model;)>
<!ATTLIST package_section %basic.atts;>
-<!ELEMENT module_section (module, fullname?, %structure.model;)>
+<!ELEMENT module_section
+ (module, fullname?, import_list?, %structure.model;)>
<!ATTLIST module_section %basic.atts;>
<!ELEMENT class_section
@@ -79,24 +81,32 @@ http://docutils.sourceforge.net/spec/docutils.dtd.
<!ATTLIST function_section %basic.atts;>
<!ELEMENT module_attribute_section
- (module_attribute, initial_value?, fullname?, %structure.model;)>
+ (attribute, initial_value?, fullname?, %structure.model;)>
<!ATTLIST module_attribute_section %basic.atts;>
<!ELEMENT class_attribute_section
- (class_attribute, initial_value?, fullname?, overrides?,
+ (attribute, initial_value?, fullname?, overrides?,
%structure.model;)>
<!ATTLIST class_attribute_section %basic.atts;>
<!ELEMENT instance_attribute_section
- (instance_attribute, initial_value?, fullname?, overrides?,
+ (attribute, initial_value?, fullname?, overrides?,
%structure.model;)>
<!ATTLIST instance_attribute_section %basic.atts;>
-<!ELEMENT fullname (package | module | class | method | function)+>
+<!ELEMENT fullname
+ (package | module | class | method | function | attribute)+>
<!ATTLIST fullname %basic.atts;>
-<!ELEMENT overrides (fullname+)>
-<!ATTLIST overrides %basic.atts;>
+<!ELEMENT import_list (import_item+)>
+<!ATTLIST import_list %basic.atts;>
+
+<!--
+Support ``import module``, ``import module as alias``, ``from module
+import identifier``, and ``from module import identifier as alias``.
+-->
+<!ELEMENT import_item (fullname, identifier?, alias?)>
+<!ATTLIST import_item %basic.atts;>
<!ELEMENT inheritance_list (class+)>
<!ATTLIST inheritance_list %basic.atts;>
@@ -121,6 +131,9 @@ http://docutils.sourceforge.net/spec/docutils.dtd.
<!ELEMENT parameter_default (#PCDATA)>
<!ATTLIST parameter_default %basic.atts;>
+<!ELEMENT overrides (fullname+)>
+<!ATTLIST overrides %basic.atts;>
+
<!ELEMENT initial_value (#PCDATA)>
<!ATTLIST initial_value %basic.atts;>
@@ -164,6 +177,18 @@ Also used as the `class_section` identifier/title, and in the
%reference.atts;>
<!--
+??? Use this instead of the ``*_attribute`` elements below? Add a
+"type" attribute to differentiate?
+
+Also used as the identifier/title for `module_attribute_section`,
+`class_attribute_section`, and `instance_attribute_section`.
+-->
+<!ELEMENT attribute (#PCDATA)>
+<!ATTLIST attribute
+ %basic.atts;
+ %reference.atts;>
+
+<!--
Also used as the `module_attribute_section` identifier/title. A module
attribute is an exported module-level global variable.
-->