Commits

Anonymous committed e19c17f

Fix regression of ticket #348 introduced in r698.

Comments (0)

Files changed (3)

 #
 
 __version__ = '0.4'
-__build__="GA R698-20100910"
+__build__="GA R699-20100913"
 
 #
 # Exceptions
 from suds.xsd.schema import Schema, SchemaCollection
 from suds.xsd.query import ElementQuery
 from suds.sudsobject import Object, Facade, Metadata
-from suds.plugin import PluginContainer
 from suds.reader import DocumentReader, DefinitionsReader
 from urlparse import urljoin
 import re, soaparray
     def build_schema(self):
         """ Process L{Types} objects and create the schema collection """
         container = SchemaCollection(self)
-        plugins = PluginContainer(self.options.plugins)
         for t in [t for t in self.types if t.local()]:
             for root in t.contents():
-                plugins.document.parsed(url=self.url, document=root)
                 schema = Schema(root, self.url, self.options, container)
                 container.add(schema)
         if not len(container): # empty

suds/xsd/doctor.py

 from logging import getLogger
 from suds.sax import splitPrefix, Namespace
 from suds.sax.element import Element
-from suds.plugin import DocumentPlugin
+from suds.plugin import DocumentPlugin, DocumentContext
 
 log = getLogger(__name__)
 
         """
         self.imports += imports
         
-    def examine(self, root):
+    def examine(self, node):
         for imp in self.imports:
-            imp.apply(root)
+            imp.apply(node)
 
     def parsed(self, context):
-        root = context.document
-        if Namespace.xsd(root.namespace()):
-            self.examine(root)
-        else:
-            pass
+        node = context.document
+        # xsd root
+        if node.name == 'schema' and Namespace.xsd(node.namespace()):
+            self.examine(node)
+            return
+        # look deeper
+        context = DocumentContext()
+        for child in node:
+            context.document = child
+            self.parsed(context)
+