有什么区别:
<choice maxOccurs="unbounded">
<element ref="test:A" maxOccurs="1"/>
</choice>
And:
<choice maxOccurs="1">
<element ref="test:A" maxOccurs="unbounded"/>
</choice>
为了任何实际目的?
在这种特殊情况下,什么都没有,但是当您向选择添加替代方案时,差异就会显现出来:
<choice maxOccurs="unbounded">
<element ref="test:A" maxOccurs="1"/>
<element ref="test:B" maxOccurs="1"/>
</choice>
将允许任意数量的 A 和 B 元素以任意顺序,而
<choice maxOccurs="1">
<element ref="test:A" maxOccurs="unbounded"/>
<element ref="test:B" maxOccurs="unbounded"/>
</choice>
允许任意数量的 A 或任意数量的 B,但不允许两者混合。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)