- From: Frédéric Jaouën <Frederic.Jaouen@accovia.com>
- Date: Mon, 26 Aug 2002 18:09:05 -0400 (EDT)
- To: xmlschema-dev@w3.org
- CC: "A_ACCOVIA !" <Frederic.Jaouen@accovia.com>
Received on Tuesday, 27 August 2002 04:12:24 UTC
Hello,
I have a question about minOccurs !
I have define a group "groupA" which contains 3 optional elements.
Is that correct to make a reference without specifying a minOccurs="0"
in my definition of "testMin" element even though all elements in
"groupA" are all optional ?
Even though it is probably not very nice, I understand in the W3C that
it can be done and I should be able to validate it !
RIGHT ???
<xs:group name="groupA">
<xs:sequence>
<xs:element name="A" minOccurs="0">
<xs:simpleType>
<xs:restriction base="S">
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="B" minOccurs="0">
<xs:simpleType>
<xs:restriction base="S">
<xs:maxLength value="32"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="C" minOccurs="0">
<xs:simpleType>
<xs:restriction base="S">
<xs:maxLength value="32"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:element name="testMin">
<xs:complexType>
<xs:sequence>
<xs:group ref="groupA"/>
<xs:group ref="groupB"/>
</xs:sequence>
</xs:complexType>
</xs:element>
"groupB" maybe anything.
Thanks !
Frédéric Jaouën
Received on Tuesday, 27 August 2002 04:12:24 UTC