--- a/xmlclass/xmlclass.py Fri Aug 31 15:09:05 2007 +0200
+++ b/xmlclass/xmlclass.py Tue Sep 04 17:08:12 2007 +0200
@@ -220,12 +220,12 @@
elif name == "choice":
super, attrs = self.GenerateXSDClasses(node, parent)
- if "ref" in attrs.keys():
- choices = attrs
- else:
- choices = {}
- for attr, (attr_type, xml_type, write_type, default) in attrs.items():
- choices[attr] = attr_type
+ choices = {}
+ for attr, values in attrs.items():
+ if attr == "ref":
+ choices[attr] = values
+ else:
+ choices[attr] = values[0]
if "maxOccurs" in node._attrs and GetAttributeValue(node._attrs["maxOccurs"]) == "unbounded":
attributes["multichoice_content"] = choices
if sequence: