- From: Vineet Chaoji <chaoji@roguewave.com>
- Date: Mon, 4 Nov 2002 10:31:58 -0800
- To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Hi,
I have the following schema:
<xs:complexType name="ImageDict">
<xs:sequence>
<xs:element name="ColorSpace">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="Object_t">
<xs:choice>
<xs:element name="Name" type="Name_t" />
<xs:element name="Array" type="Array_t" />
</xs:choice>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
.......
........
</xs:sequence>
</xs:complexType>
<xs:complexType name="Object_t">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
<xs:attribute name="ID" type="xs:ID" use="optional" />
<xs:attribute name="IDREF" type="xs:IDREF" use="optional" />
</xs:complexType>
The ColorSpace element inside the ImageDict complexType restricts Object_t.
But the Name and Array elements (inside the choice) that it is trying to
restrict are not present in the base complexType.
As per my understanding, for restriction the particle that is being
restricted
has to be present in the complexType that is being restricted.
Am I correct (and that means that the schema is incorrect)?
I tried looking at the spec but couldnt find anything concrete that ratifies
my understanding.
Could you point out the section in the spec that confirms/negates my
understanding?
Is there a simplified/annotated version of the schema spec? To understand
anything in
the current spec I have to read it atleast 2-3 times.
Thanks in anticipation,
Vineet
Received on Monday, 4 November 2002 13:36:47 UTC