Re: xsd:group and minOccurs

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
/Eddie

>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>
></xsd:element>
>
>the choice has three (element declaration) particles, regardless of
>whether the Test element in the instance document has any content or
>not.
>  
>Cheers,
>
>Jeni
>
>[1] http://www.w3.org/TR/xmlschema-1/#cvc-model-group
>
>---
>Jeni Tennison
>http://www.jenitennison.com/
>
>  
>

Received on Thursday, 29 August 2002 22:19:13 UTC