[Zodb-checkins] CVS: ZODB3/ZConfig - schema.py:1.16

Fred L. Drake, Jr. fred@zope.com
Thu, 16 Jan 2003 12:26:32 -0500


Update of /cvs-repository/ZODB3/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv23733

Modified Files:
	schema.py 
Log Message:
More refactoring to simplify some of the schema component support.


=== ZODB3/ZConfig/schema.py 1.15 => 1.16 ===
--- ZODB3/ZConfig/schema.py:1.15	Thu Jan 16 12:16:55 2003
+++ ZODB3/ZConfig/schema.py	Thu Jan 16 12:26:28 2003
@@ -445,9 +445,10 @@
 
 class BaseComponentParser(BaseParser):
 
-    def __init__(self, registry, loader, url, localtypes):
-        self._localtypes = localtypes
+    def __init__(self, registry, loader, url, schema, localtypes):
         BaseParser.__init__(self, registry, loader, url)
+        self._localtypes = localtypes
+        self._parent = schema
 
     def characters_description(self, data):
         if self._stack:
@@ -481,8 +482,7 @@
     _top_level = "component"
 
     def __init__(self, registry, loader, url, schema):
-        BaseComponentParser.__init__(self, registry, loader, url, {})
-        self._parent = schema
+        BaseComponentParser.__init__(self, registry, loader, url, schema, {})
 
     def start_component(self, attrs):
         self._schema = self._parent
@@ -502,10 +502,6 @@
 
     _handled_tags = BaseComponentParser._handled_tags + ("extension",)
     _top_level = "extension"
-
-    def __init__(self, registry, loader, url, schema, localtypes):
-        BaseComponentParser.__init__(self, registry, loader, url, localtypes)
-        self._parent = schema
 
     def start_extension(self, attrs):
         self._schema = self._parent