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

Fred L. Drake, Jr. fred@zope.com
Wed, 18 Dec 2002 11:16:02 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	schema.dtd 
Log Message:
Changes to the schema language:
- The minOccurs and maxOccurs attributes are gone
- To specify minOccurs==1, use required="yes" in the schema
- To specify maxOccurs=="unbounded", use a <multikey> or <multisection>
  instead of <key> or <section>

This needs some code review and refactoring, but works.


=== Packages/ZConfig/xml/schema.dtd 1.1.2.7 => 1.1.2.8 ===
--- Packages/ZConfig/xml/schema.dtd:1.1.2.7	Fri Dec 13 12:11:57 2002
+++ Packages/ZConfig/xml/schema.dtd	Wed Dec 18 11:16:01 2002
@@ -2,34 +2,40 @@
 
 <!ELEMENT schema (description?,
                   (sectiontype | sectiongroup)*,
-                  (section | key)*)>
+                  (section | key | multisection | multikey)*)>
 <!ATTLIST schema
           prefix     NMTOKEN  #IMPLIED
           handler    NMTOKEN  #IMPLIED
           keytype    NMTOKEN  #IMPLIED
-          datatype   NMTOKEN  #IMPLIED
-          valuetype  NMTOKEN  #IMPLIED>
+          datatype   NMTOKEN  #IMPLIED>
 
 <!ELEMENT description (#PCDATA)*>
 <!ELEMENT metadefault (#PCDATA)*>
 <!ELEMENT example     (#PCDATA)*>
 
-<!ELEMENT key (description?, metadefault?, example?, default*)>
+<!ELEMENT key (description?, metadefault?, example?)>
 <!ATTLIST key
           name       NMTOKEN  #REQUIRED
           attribute  NMTOKEN  #IMPLIED
           datatype   NMTOKEN  #IMPLIED
           handler    NMTOKEN  #IMPLIED
-          minOccurs  NMTOKEN  #IMPLIED
-          maxOccurs  NMTOKEN  #IMPLIED>
+          required   (yes|no) "no"
+          default    CDATA    #IMPLIED>
+
+<!ELEMENT multikey (description?, metadefault?, example?, default*)>
+<!ATTLIST multikey
+          name       NMTOKEN  #REQUIRED
+          attribute  NMTOKEN  #IMPLIED
+          datatype   NMTOKEN  #IMPLIED
+          handler    NMTOKEN  #IMPLIED
+          required   (yes|no) "no">
 
 <!ELEMENT sectiontype (description?, (section | key)*)>
 <!ATTLIST sectiontype
           type       NMTOKEN  #REQUIRED
           prefix     NMTOKEN  #IMPLIED
           keytype    NMTOKEN  #IMPLIED
-          datatype   NMTOKEN  #IMPLIED
-          valuetype  NMTOKEN  #IMPLIED>
+          datatype   NMTOKEN  #IMPLIED>
 
 <!ELEMENT sectiongroup (description?, sectiontype+)>
 <!ATTLIST sectiongroup
@@ -44,3 +50,11 @@
           handler    NMTOKEN  #IMPLIED
           minOccurs  NMTOKEN  #IMPLIED
           maxOccurs  NMTOKEN  #IMPLIED>
+
+<!ELEMENT multisection (description?)>
+<!ATTLIST multisection
+          name       NMTOKEN  #REQUIRED
+          attribute  NMTOKEN  #IMPLIED
+          type       NMTOKEN  #REQUIRED
+          handler    NMTOKEN  #IMPLIED
+          required   (yes|no) "no">