|
@@ -1375,7 +1375,7 @@ class AttributeGroupDefinition(XMLSchemaComponent,\ |
|
|
content = [] |
|
|
content = [] |
|
|
|
|
|
|
|
|
for indx in range(len(contents)): |
|
|
for indx in range(len(contents)): |
|
|
component = SplitQName(i.getTagName())[1] |
|
|
|
|
|
|
|
|
component = SplitQName(contents[indx].getTagName())[1] |
|
|
if (component == 'annotation') and (not indx): |
|
|
if (component == 'annotation') and (not indx): |
|
|
self.annotation = Annotation(self) |
|
|
self.annotation = Annotation(self) |
|
|
self.annotation.fromDom(contents[indx]) |
|
|
self.annotation.fromDom(contents[indx]) |
|
@@ -1394,7 +1394,7 @@ class AttributeGroupDefinition(XMLSchemaComponent,\ |
|
|
content.append(AttributeWildCard()) |
|
|
content.append(AttributeWildCard()) |
|
|
content[-1].fromDom(contents[indx]) |
|
|
content[-1].fromDom(contents[indx]) |
|
|
else: |
|
|
else: |
|
|
raise SchemaError, 'Unknown component (%s)' %(i.getTagName()) |
|
|
|
|
|
|
|
|
raise SchemaError, 'Unknown component (%s)' %(contents[indx].getTagName()) |
|
|
|
|
|
|
|
|
self.attr_content = tuple(content) |
|
|
self.attr_content = tuple(content) |
|
|
|
|
|
|
|
@@ -1999,13 +1999,17 @@ class ModelGroupReference(XMLSchemaComponent,\ |
|
|
attributes: |
|
|
attributes: |
|
|
id -- ID |
|
|
id -- ID |
|
|
ref -- NCName, required |
|
|
ref -- NCName, required |
|
|
|
|
|
minOccurs -- Whole Number, 1 |
|
|
|
|
|
maxOccurs -- (Whole Number | 'unbounded'), 1 |
|
|
|
|
|
|
|
|
contents: |
|
|
contents: |
|
|
annotation? |
|
|
annotation? |
|
|
""" |
|
|
""" |
|
|
required = ['ref'] |
|
|
required = ['ref'] |
|
|
attributes = {'id':None, |
|
|
attributes = {'id':None, |
|
|
'ref':None} |
|
|
|
|
|
|
|
|
'ref':None, |
|
|
|
|
|
'minOccurs':'1', |
|
|
|
|
|
'maxOccurs':'1'} |
|
|
contents = {'xsd':['annotation']} |
|
|
contents = {'xsd':['annotation']} |
|
|
|
|
|
|
|
|
def __init__(self, parent): |
|
|
def __init__(self, parent): |
|
@@ -2413,6 +2417,7 @@ class SimpleType(XMLSchemaComponent,\ |
|
|
if component == 'annotation': |
|
|
if component == 'annotation': |
|
|
self.annotation = Annotation(self) |
|
|
self.annotation = Annotation(self) |
|
|
self.annotation.fromDom(child) |
|
|
self.annotation.fromDom(child) |
|
|
|
|
|
continue |
|
|
break |
|
|
break |
|
|
else: |
|
|
else: |
|
|
return |
|
|
return |
|
@@ -2423,7 +2428,7 @@ class SimpleType(XMLSchemaComponent,\ |
|
|
elif component == 'union': |
|
|
elif component == 'union': |
|
|
self.content = self.__class__.Union(self) |
|
|
self.content = self.__class__.Union(self) |
|
|
else: |
|
|
else: |
|
|
raise SchemaError, 'Unknown component (%s)' %(contents[indx].getTagName()) |
|
|
|
|
|
|
|
|
raise SchemaError, 'Unknown component (%s)' %(component) |
|
|
self.content.fromDom(child) |
|
|
self.content.fromDom(child) |
|
|
|
|
|
|
|
|
class Restriction(XMLSchemaComponent,\ |
|
|
class Restriction(XMLSchemaComponent,\ |
|
|