From 81ed7e7b566b1ac05639e7df8f530f56640795e2 Mon Sep 17 00:00:00 2001 From: Joshua Boverhof Date: Thu, 31 Jul 2003 06:37:38 +0000 Subject: [PATCH] ---------------------------------------------------------------------- Modified Files: XMLSchema.py -- Namespaced a couple attributes in attribute dictionary that I missed. ---------------------------------------------------------------------- --- XMLSchema.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/XMLSchema.py b/XMLSchema.py index 94c0d3b..b5466da 100755 --- a/XMLSchema.py +++ b/XMLSchema.py @@ -768,7 +768,7 @@ class XMLSchema(XMLSchemaComponent): """ self.targetNamespace = None XMLSchemaComponent.__init__(self, parent) - f = lambda k: k.attributes['name'] + f = lambda k: k.attributes[XMLSchemaComponent.xsd]['name'] self.includes = Collection(self, key=f) self.imports = Collection(self, key=f) self.elements = Collection(self, key=f) @@ -885,7 +885,7 @@ class XMLSchema(XMLSchemaComponent): if component == 'include': tp = self.__class__.Include(self) tp.fromDom(node) - self.includes[tp.attributes['schemaLocation']] = tp + self.includes[tp.attributes[XMLSchemaComponent.xsd]['schemaLocation']] = tp schema = tp.getSchema() if schema.targetNamespace and \ @@ -901,11 +901,11 @@ class XMLSchema(XMLSchemaComponent): elif component == 'import': tp = self.__class__.Import(self) tp.fromDom(node) - if tp.attributes['namespace']: - if tp.attributes['namespace'] == self.targetNamespace: + if tp.attributes[XMLSchemaComponent.xsd]['namespace']: + if tp.attributes[XMLSchemaComponent.xsd]['namespace'] == self.targetNamespace: raise SchemaError,\ 'import and schema have same targetNamespace' - self.imports[tp.attributes['namespace']] = tp + self.imports[tp.attributes[XMLSchemaComponent.xsd]['namespace']] = tp else: self.imports[self.__class__.empty_namespace] = tp elif component == 'redefine':