Re: [Moderator Action] Choice group element

 > Can you use choice to select elements of the same name but different
type.
 > In other words is the following legal:
 >
 > <choice>
 >     <element    name="a"    type="x"/>
 >     <element    name="a"    type="y"/>
 >     <element    name="a"    type="z"/>
 > </choice>

Henry is definitely right-- a good workaround (which may not be useful in
your case) is to use the extension model built into schemas.  Build a
complexType "w" which may or may not define content-- and then use that as
the base for extending "x", "y", and "z".  Then your choice would look
something like:

 <choice>
     <element    name="a"    type="w"/>
 </choice>

And within your instance you could specify the actual type used by
indicating xsi:type="y".  Other than that there may be a couple of other
indirect approaches using substitution (?) but they aren't popping to mind
so quickly.

Good Luck,
Jeff Rafter

Received on Monday, 5 March 2001 11:59:45 UTC