From bebb1ff29d268f65975b9d58f0c76946bd4cb41b Mon Sep 17 00:00:00 2001 From: Joshua Boverhof Date: Sat, 6 Dec 2003 00:17:21 +0000 Subject: [PATCH] ---------------------------------------------------------------------- Modified Files: XMLSchema.py -- error in Import class for accessing a schemaLocation. This bug would only show up if a schema had to 'construct' a schema instance of a different namespace itself. Basically the last option. ---------------------------------------------------------------------- --- XMLSchema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XMLSchema.py b/XMLSchema.py index a410b68..873d897 100755 --- a/XMLSchema.py +++ b/XMLSchema.py @@ -1100,7 +1100,8 @@ class XMLSchema(XMLSchemaComponent): if not schema and self._parent()._parent: schema = self._parent()._parent().getImportSchemas().get(ns) if not schema: - if not self.attributes.has_key('schemaLocation'): + url = self.attributes.get('schemaLocation') + if not url: raise SchemaError, 'namespace(%s) is unknown' %ns base_url = self._parent().getBaseUrl() reader = SchemaReader(base_url=base_url)