问题
In an XML schema can a complex type contain a choice of other complex types? I couldn't find any information about that.
回答1:
Yes, see section 3.4.2 of the XML Schema reference; a complexType
can indeed contain a choice
element.
Similarly, a choice
element can contain one or more complexType
elements (see section 3.8.2).
来源:https://stackoverflow.com/questions/11252175/choice-of-complex-types-in-an-xsd