xmlclass/xsdschema.py
changeset 1849 6811021e3d94
parent 1847 6198190bc121
child 1852 70c1cc354a8f
equal deleted inserted replaced
1848:201e0f1896c4 1849:6811021e3d94
   782 
   782 
   783 def ReduceAll(factory, attributes, elements):
   783 def ReduceAll(factory, attributes, elements):
   784     annotations, children = factory.ReduceElements(elements)
   784     annotations, children = factory.ReduceElements(elements)
   785 
   785 
   786     for child in children:
   786     for child in children:
   787         if children["maxOccurs"] == "unbounded" or children["maxOccurs"] > 1:
   787         if child["maxOccurs"] == "unbounded" or child["maxOccurs"] > 1:
   788             raise ValueError("\"all\" item can't have \"maxOccurs\" attribute greater than 1!")
   788             raise ValueError("\"all\" item can't have \"maxOccurs\" attribute greater than 1!")
   789 
   789 
   790     return {"type": "all", "elements": children, "minOccurs": attributes["minOccurs"],
   790     return {"type": "all", "elements": children, "minOccurs": attributes["minOccurs"],
   791             "maxOccurs": attributes["maxOccurs"], "order": False, "doc": annotations}
   791             "maxOccurs": attributes["maxOccurs"], "order": False, "doc": annotations}
   792 
   792