Change Sequence to Choice
Posted
by
Gordon
on Stack Overflow
See other posts from Stack Overflow
or by Gordon
Published on 2011-02-09T14:54:07Z
Indexed on
2011/02/09
15:25 UTC
Read the original article
Hit count: 194
In my Schema File I defined a Group with a Sequence of possible Elements.
<group name="argumentGroup">
<sequence>
<element name="foo" type="double" />
<element name="bar" type="string" />
<element name="baz" type="integer" />
</sequence>
</group>
I then reference this Group like this:
<element name="arguments">
<complexType>
<group ref="my:argumentGroup"/>
</complexType>
</element>
Is it possible to reference the Group at some other point but restrict it so it's a Choice instead of a Sequence. The position where I want to reuse it would only allow one of the Elements within.
<element name="argument" minOccurs="0" maxOccurs="1">
<complexType>
<group name="my:argumentGroup">
<! -- Somehow change argumentGroup sequence to choice here -->
</group>
<complexType>
</element>
© Stack Overflow or respective owner