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

Newbie question regarding restriction

From: Vineet Chaoji <chaoji@roguewave.com>
Date: Mon, 4 Nov 2002 10:31:58 -0800
Message-ID: <F888C30C3021D411B9DA00B0D0209BE803EB4591@cvo-exchange.cvo.roguewave.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>


I have the following schema:

<xs:complexType name="ImageDict">
    <xs:element name="ColorSpace">
          <xs:restriction base="Object_t">
              <xs:element name="Name" type="Name_t" />
              <xs:element name="Array" type="Array_t" />
<xs:complexType name="Object_t">
  <xs:attribute name="ID" type="xs:ID" use="optional" />
  <xs:attribute name="IDREF" type="xs:IDREF" use="optional" />

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

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,
Received on Monday, 4 November 2002 13:36:47 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:58 UTC