[Zope3-checkins] CVS: Packages/ZConfig - schema.py:1.1.2.14

Fred L. Drake, Jr. fred@zope.com
Fri, 13 Dec 2002 12:13:30 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	schema.py 
Log Message:
Reflect attribute name changes from the DTD.

=== Packages/ZConfig/schema.py 1.1.2.13 => 1.1.2.14 ===
--- Packages/ZConfig/schema.py:1.1.2.13	Fri Dec 13 10:16:57 2002
+++ Packages/ZConfig/schema.py	Fri Dec 13 12:12:59 2002
@@ -128,7 +128,7 @@
     def get_sect_typeinfo(self, attrs):
         keytype = self.get_datatype(attrs, "keytype", default_key_type)
         valuetype = self.get_datatype(attrs, "valuetype", default_value_type)
-        datatype = self.get_datatype(attrs, "type", default_section_type)
+        datatype = self.get_datatype(attrs, "datatype", default_section_type)
         return keytype, valuetype, datatype
 
     def start_schema(self, attrs):
@@ -143,7 +143,7 @@
         assert not self._prefixes
 
     def start_sectiontype(self, attrs):
-        name = attrs.get("name")
+        name = attrs.get("type")
         if not name:
             self.doSchemaError(
                 "sectiontype name must not be omitted or empty")
@@ -177,7 +177,7 @@
         if self._group is not None:
             self.doSchemaError("sectiongroup elements cannot be nested")
         self.push_prefix(attrs)
-        name = attrs.get("name")
+        name = attrs.get("type")
         if not name:
             self.doSchemaError("sectiongroup must be named")
         self._group = info.GroupType(name)
@@ -195,7 +195,7 @@
             self.doSchemaError("key name may not be omitted or empty")
         # run the keytype converter to make sure this is a valid key
         name = self._stack[-1].keytype.convert(name)
-        datatype = datatypes.get(attrs.get("type"))
+        datatype = datatypes.get(attrs.get("datatype"))
         maxOccurs, minOccurs, handler = self.get_common_info(attrs)
         attribute = attrs.get("attribute")
         if attribute: