W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2000

derivedBy in simple and complex types

From: Liz <lcastro@cookwood.com>
Date: Tue, 08 Aug 2000 21:26:59 -0400
Message-ID: <3990B363.DB61E452@cookwood.com>
To: www-xml-schema-comments@w3.org
(Trying another email client to avoid the attachments. Again, profuse

Could someone confirm if the derivedBy attribute is only required when
you derive a complex type, but not when you derive a simple one?

For example, there is the example in the Primer:

<xsd:simpleType name="Sku" base="xsd:string">
 <xsd:pattern value="\d{3}-[A-Z]{2}"/>

which validates just fine.

But when I have a complex type definition like:

<xsd:complexType name="populationType" base="xsd:integer">
 <xsd:attribute name="year" use="required">
      <xsd:simpleType base="xsd:integer"/>

the XML Schema Validator (XSV) gives me an error and says I must use the
derivedBy extension if the base is present.


Liz Castro
Cookwood Press
Received on Tuesday, 8 August 2000 21:20:42 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC