From bc552a5fe122b30824dac962d5edd65ebc80493f Mon Sep 17 00:00:00 2001 From: Joshua Boverhof Date: Sat, 10 Sep 2005 01:02:14 +0000 Subject: [PATCH] ---------------------------------------------------------------------- Modified Files: ZSI/wstools/XMLSchema.py -- fixed a few syntax errors in Restriction class, and removed "self.facets" in ComplexType which was never used? ---------------------------------------------------------------------- --- XMLSchema.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/XMLSchema.py b/XMLSchema.py index 96437fe..abd89ac 100755 --- a/XMLSchema.py +++ b/XMLSchema.py @@ -2288,7 +2288,6 @@ class ComplexType(XMLSchemaComponent,\ XMLSchemaComponent.__init__(self, parent) self.annotation = None self.content = None - self.facets = [] self.attr_content = None def isMixed(self): @@ -2316,7 +2315,6 @@ class ComplexType(XMLSchemaComponent,\ def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) - facets = {} indx = 0 num = len(contents) @@ -2785,6 +2783,7 @@ class SimpleType(XMLSchemaComponent,\ XMLSchemaComponent.__init__(self, parent) self.annotation = None self.content = None + self.facets = None def getAttributeBase(self): return XMLSchemaComponent.getAttribute(self, 'base') @@ -2798,6 +2797,7 @@ class SimpleType(XMLSchemaComponent,\ return None def fromDom(self, node): + self.facets = [] self.setAttributes(node) contents = self.getContents(node) content = [] @@ -2812,8 +2812,7 @@ class SimpleType(XMLSchemaComponent,\ content.append(AnonymousSimpleType(self)) content[-1].fromDom(contents[indx]) elif component in RestrictionMarker.facets: - facets[component] = contents[indx] - self.facets.append(facets) + self.facets.append(contents[indx]) else: raise SchemaError, 'Unknown component (%s)' %(i.getTagName()) self.content = tuple(content)