Beispiel #1
0
 def _conditional_load(self):
     loader = SchemaLoader()
     # loadURL
     url = loader.normalizeURL(self.schemafile)
     resource = loader.openResource(url)
     try:
         # load / parseResource without caching
         parser = ConditionalSchemaParser(loader, resource.url)
         xml.sax.parse(resource.file, parser)
         self.schema = parser._schema
     finally:
         resource.close()
Beispiel #2
0
 def _conditional_load(self):
     loader = SchemaLoader()
     # loadURL
     url = loader.normalizeURL(self.schemafile)
     resource = loader.openResource(url)
     try:
         # load / parseResource without caching
         parser = ConditionalSchemaParser(loader, resource.url)
         xml.sax.parse(resource.file, parser)
         self.schema = parser._schema
     finally:
         resource.close()