changeset 674 | bbffe4110141 |
parent 592 | 89ff2738ef20 |
child 682 | 4d437bc0ef3f |
--- a/xmlclass/xsdschema.py Fri Apr 27 02:00:47 2012 +0200 +++ b/xmlclass/xsdschema.py Mon Apr 30 16:27:25 2012 +0200 @@ -807,6 +807,10 @@ choices_tmp.append(choice) choices.extend(choices_tmp) + for choice in choices: + attributes["minOccurs"] = min(attributes["minOccurs"], choice["minOccurs"]) + choice["minOccurs"] = 1 + return {"type": CHOICE, "choices": choices, "minOccurs": attributes["minOccurs"], "maxOccurs": attributes["maxOccurs"], "doc": annotations}