[Zodb-checkins] CVS: Packages/ZConfig/xml - schema.dtd:1.1.2.4

Fred L. Drake, Jr. fred@zope.com
Thu, 12 Dec 2002 02:19:01 -0500


Update of /cvs-repository/Packages/ZConfig/xml
In directory cvs.zope.org:/tmp/cvs-serv21519

Modified Files:
      Tag: zconfig-schema-devel-branch
	schema.dtd 
Log Message:
Figured a cleaner way for sections, section types, and section groups
to relate to each other; this is more flexible and reusable, and
allows the "handler" attribute to make more sense.

Will refactor the code after the sun comes up.


=== Packages/ZConfig/xml/schema.dtd 1.1.2.3 => 1.1.2.4 ===
--- Packages/ZConfig/xml/schema.dtd:1.1.2.3	Mon Dec  9 17:52:48 2002
+++ Packages/ZConfig/xml/schema.dtd	Thu Dec 12 02:19:00 2002
@@ -1,8 +1,10 @@
 <!-- DTD for ZConfig schema documents. -->
 
-<!ELEMENT schema (description?, (section | sectiongroup | key)*)>
+<!ELEMENT schema (description?,
+                  (sectiontype | sectiongroup)*,
+                  (section | key)*)>
 <!ATTLIST schema
-          prefix     CDATA    #IMPLIED
+          prefix     NMTOKEN  #IMPLIED
           handler    NMTOKEN  #IMPLIED
           keytype    NMTOKEN  #IMPLIED>
 
@@ -12,27 +14,33 @@
 
 <!ELEMENT key (description?, metadefault?, example?, default*)>
 <!ATTLIST key
-          name       CDATA    #REQUIRED
+          name       NMTOKEN  #REQUIRED
           attribute  NMTOKEN  #IMPLIED
           type       NMTOKEN  #IMPLIED
           handler    NMTOKEN  #IMPLIED
           minOccurs  NMTOKEN  #IMPLIED
           maxOccurs  NMTOKEN  #IMPLIED>
 
-<!ELEMENT section (description?, (section | sectiongroup | key)*)>
-<!ATTLIST section
-          prefix     CDATA    #IMPLIED
-          names      CDATA    #IMPLIED
-          attribute  NMTOKEN  #IMPLIED
+<!ELEMENT sectiontype (description?, (section | key)*)>
+<!ATTLIST sectiontype
+          name       NMTOKEN  #REQUIRED
+          prefix     NMTOKEN  #IMPLIED
           keytype    NMTOKEN  #IMPLIED
-          handler    NMTOKEN  #IMPLIED
+          type       NMTOKEN  #IMPLIED>
+
+<!ELEMENT sectiongroup (description?, sectiontype+)>
+<!ATTLIST sectiongroup
+          prefix     NMTOKEN  #IMPLIED
+          name       NMTOKEN  #IMPLIED
+          attribute  NMTOKEN  #IMPLIED
           minOccurs  NMTOKEN  #IMPLIED
           maxOccurs  NMTOKEN  #IMPLIED>
 
-<!ELEMENT sectiongroup (description?, section+)>
-<!ATTLIST sectiongroup
-          prefix     CDATA    #IMPLIED
-          names      CDATA    #IMPLIED
+<!ELEMENT section (description? (section | key)*)>
+<!-- XXX  The (section | key)* here is used to override defaults
+          defined by the relevant sectiontype element. -->
+<!ATTLIST section
+          name       NMTOKEN  #IMPLIED
           attribute  NMTOKEN  #IMPLIED
           type       NMTOKEN  #IMPLIED
           handler    NMTOKEN  #IMPLIED