equal
deleted
inserted
replaced
150 annotations, children = factory.ReduceElements(elements) |
150 annotations, children = factory.ReduceElements(elements) |
151 union = {"type": "union", "memberTypes": attributes.get("memberTypes", []), "doc": annotations} |
151 union = {"type": "union", "memberTypes": attributes.get("memberTypes", []), "doc": annotations} |
152 |
152 |
153 for child in children: |
153 for child in children: |
154 if child["type"] == SIMPLETYPE: |
154 if child["type"] == SIMPLETYPE: |
155 union["memberTypes"].appendchild |
155 union["memberTypes"].append(child) |
156 if len(union["memberTypes"]) == 0: |
156 if len(union["memberTypes"]) == 0: |
157 raise ValueError("No base type has been defined for union!") |
157 raise ValueError("No base type has been defined for union!") |
158 return union |
158 return union |
159 |
159 |
160 |
160 |