Jeni,
Actually, NumWafers and Wafers are mandatory, they just want them in any
order. It's everything in :
<xsd:extension base="Type_ToolLotSummary">
The Type_ToolLotSummary, which is above <xs:all> that is optional
(everyting), and also needed to be in any order.
Dumb question : Is <xs:???> and <xsd:???> the same thing?
Regardless, I really appreciate the help, Jeni. While I'm extremely curious
how I can get this working in the future, the project is currently on the
back burner, as other tasks have taken higher priority. I probably won't be
able to get back to the schema for another 2-3wks.
Michael
-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: Saturday, March 15, 2003 3:39 AM
To: Scott, Michael Gordon
Cc: Sam Carleton; xmlschema-dev
Subject: Re: allowing zero to unbounded elements in any order?
Hi Michael,
> I'm confused. Isn't the
>
> "minOccurs=0"
>
> just what is telling the schema that this particular element that
> it's optional?
In:
<xs:sequence minOccurs="0">
<xs:element name="NumWafers" type="xsd:nonNegativeInteger" />
<xs:element name="Wafers" type="WaferLocations" />
</xs:sequence>
the sequence as a whole is optional. You are saying that *either* you
have a sequence comprising a <NumWafers> element followed by a
<Wafers> element, or you have nothing at all. If you want to say that
a particular element is optional, use minOccurs="0" on the
<xs:element> element for that element.
I was actually misremembering the spec; putting minOccurs="0" on an
<xs:all> element is fine. You should be able to do:
<xs:all minOccurs="0">
<xs:element name="NumWafers" type="xsd:nonNegativeInteger" />
<xs:element name="Wafers" type="WaferLocations" />
</xs:all>
in order to get <NumWafers> and <Wafers> to appear in any order.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/