"Seago" <se****@gmail.comwrites:
I'm not sure if I can explain my issue well enough, but here goes:
I want to define an .XSD such that it allows for an ( A | B )*
configuration where A and B are different elements. I would like to
allow for an infinite list of either type A or type B elements. I
could accomplish this in a DTD file, but I would like to migrate to XSD
and I'm having difficulty with this aspect of it. I thought an
<xs:sequence><xs:choice>... nest might do the trick, but it's not
working and I'm not even sure if this is legal syntax.
Thanks for any help you can give me.
Er, what's wrong with
<xsd:choice maxOccurs="unbounded">
<xsd:element ref="A"/>
<xsd:element ref="B"/>
</xsd:choice>
(which is a very simple literal translation of your example)?
(In general, if you are having trouble getting something to
work and are asking others for help, it's a good idea to
show more fully what you have tried, and to describe more fully
what error messages it elicited. See [1] for a useful essay
on the art of asking good questions.)
--C. M. Sperberg-McQueen
World Wide Web Consortium
[1]
http://www.catb.org/~esr/faqs/smart-questions.html