W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2002

Re: xsd:group and minOccurs

From: Eddie Robertsson <erobertsson@allette.com.au>
Date: Fri, 30 Aug 2002 12:18:38 +1000
Message-ID: <3D6ED5FE.6010906@allette.com.au>
To: Jeni Tennison <jeni@jenitennison.com>
CC: xmlschema-dev@w3.org, "Gregory M. Messner" <gmessner@breezefactor.com>

Hi Jeni,

Thanks for the explanation. It makes a bit more sense now but....

>For some reason this isn't a constraint that's checked at the schema
>level -- you only work out that your schema isn't ever going to work
>when you try to validate instances against it.
I find this very confusing. To have a constraint on the schema level 
that only is checked on instance validation seems very strange.

>BTW, note that "particles" are the things that live inside model
>groups (they're things in the schema). I have a feeling that you're
>interpreting "particles" to mean "elements in content in an instance",
>which I don't think is right. 
Well, I was aware that particles only live in the schema but I think I 
did get mixed somewhere along the way.

Thanks for the clarification

>For example, even if the instance were:
>  <Test>
>    <foo />
>  </Test>
>the choice model group would still have no particles, and if you have:
><xsd:element name="Test">
>  <xsd:complexType>
>    <xsd:choice>
>      <xsd:element name="A" minOccurs="0" type="xsd:string" />
>      <xsd:element name="B" minOccurs="0" type="xsd:string" />
>      <xsd:element name="C" minOccurs="0" type="xsd:string" />
>    </xsd:choice>
>  </xsd:complexType>
>the choice has three (element declaration) particles, regardless of
>whether the Test element in the instance document has any content or
>[1] http://www.w3.org/TR/xmlschema-1/#cvc-model-group
>Jeni Tennison
Received on Thursday, 29 August 2002 22:19:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:05 UTC