我有一些看起来像这样的XSD: element name="a" complexType sequence element name="b" type="t:typ" minOccurs="1" maxOccurs="unbounded" / element name="c" type="t:typ" minOccurs="1" maxOccurs="unbounded" / /sequence /complexType/ele
<element name="a">
<complexType>
<sequence>
<element name="b" type="t:typ" minOccurs="1" maxOccurs="unbounded" />
<element name="c" type="t:typ" minOccurs="1" maxOccurs="unbounded" />
</sequence>
</complexType>
</element>
我如何改变它,以便代替序列,我可以允许标签b和c以任何顺序混杂,例如我怎么才能使这个有效?
<a> <b /> <c /> <b /> <c /> <b /> <b /> </a>
‘all’选项听起来很有希望,但它似乎只允许每个子元素中只有一个.
我相信你想要这个:<element name="a">
<complexType>
<choice maxOccurs="unbounded">
<element name="b" type="t:typ" />
<element name="c" type="t:typ" />
</choice>
</complexType>
</element>
