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

Newbie question

From: Vineet Chaoji <chaoji@roguewave.com>
Date: Fri, 27 Dec 2002 13:49:15 -0800
Message-ID: <F888C30C3021D411B9DA00B0D0209BE804DBE48E@cvo-exchange.cvo.roguewave.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

Hi all,

I have a question regarding restriction in complexTypes.

Consider the following complexTypes

<xsd:complexType name="EntityT">
  <xsd:attribute name="entityTypeName" type="ent:EntityTypeNameT"

<xsd:complexType name="ObsProjectEntityT">
      <xsd:restriction base="ent:EntityT">
         <xsd:attribute name="entityTypeName" type="ent:EntityTypeNameT"

ObsProjectEntityT restricts EntityT.
Now my question is whether it is necessary to have the use="required" in
ObsProjectEntityT when it puts constraints on the attribute entityTypeName.

Is it that attributes ('use' in this case) not defined in the restricting
complexType are assumed to be picked from the base complexType?

As per my understanding, the derived complexType should represent a subset
of the base complexType and the absence of use="required" (which implies
use="optional") in the derived complexType violates this rule.

Is my understanding correct? I would really appreciate if you have pointers
in the specs that clear this point.

Received on Friday, 27 December 2002 16:51:09 UTC

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