equal
deleted
inserted
replaced
218 |
218 |
219 # This tag defines an attribute that can have different types |
219 # This tag defines an attribute that can have different types |
220 elif name == "choice": |
220 elif name == "choice": |
221 super, attrs = self.GenerateXSDClasses(node, parent) |
221 super, attrs = self.GenerateXSDClasses(node, parent) |
222 |
222 |
223 if "ref" in attrs.keys(): |
223 choices = {} |
224 choices = attrs |
224 for attr, values in attrs.items(): |
225 else: |
225 if attr == "ref": |
226 choices = {} |
226 choices[attr] = values |
227 for attr, (attr_type, xml_type, write_type, default) in attrs.items(): |
227 else: |
228 choices[attr] = attr_type |
228 choices[attr] = values[0] |
229 if "maxOccurs" in node._attrs and GetAttributeValue(node._attrs["maxOccurs"]) == "unbounded": |
229 if "maxOccurs" in node._attrs and GetAttributeValue(node._attrs["maxOccurs"]) == "unbounded": |
230 attributes["multichoice_content"] = choices |
230 attributes["multichoice_content"] = choices |
231 if sequence: |
231 if sequence: |
232 order.append("multichoice_content") |
232 order.append("multichoice_content") |
233 else: |
233 else: |