From 7323f4751cb527676f66e1104031803b7b881476 Mon Sep 17 00:00:00 2001 From: Gregory Warnes Date: Fri, 18 Feb 2005 13:50:14 +0000 Subject: [PATCH] Apply patch submitted by Peter McA'Nulty of WebReply.com: "class SimpleContent, class Extension.fromDom() at line ~2313 doesn't handle extensions without contents -- unusual, but not illegal" --- XMLSchema.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/XMLSchema.py b/XMLSchema.py index 0344f10..d785a3e 100755 --- a/XMLSchema.py +++ b/XMLSchema.py @@ -2506,13 +2506,15 @@ class ComplexType(XMLSchemaComponent,\ indx = 0 num = len(contents) - component = SplitQName(contents[indx].getTagName())[1] - if component == 'annotation': - self.annotation = Annotation(self) - self.annotation.fromDom(contents[indx]) - indx += 1 - component = SplitQName(contents[indx].getTagName())[1] + if num: + component = SplitQName(contents[indx].getTagName())[1] + if component == 'annotation': + self.annotation = Annotation(self) + self.annotation.fromDom(contents[indx]) + indx += 1 + component = SplitQName(contents[indx].getTagName())[1] + content = [] while indx < num: component = SplitQName(contents[indx].getTagName())[1]