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

Re: simpleType redefinition - must it be a restriction?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Sat, 5 Jan 2002 13:14:48 +0000
Message-ID: <11347661683.20020105131448@jenitennison.com>
To: Mark Feblowitz <mfeblowitz@frictionless.com>
CC: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>, "Henry Thompson (E-mail)" <ht@cogsci.ed.ac.uk>, "'support@xmlspy.com'" <support@xmlspy.com>, "'al@altova.com'" <al@altova.com>
Hi Mark,

> Must a redefinition of a simpleType result in a more constrained
> simpleType? Or can it be less constrained?

Redefinitions of a simple type must be restrictions of that simple
type (since <simpleType> elements within a <redefine> element must
have a <restriction> child). Restrictions within a redefine follow the
same rules as restrictions elsewhere.

> XMLSpy says that any of AUD, EUR, USD or USD (!) are allowed in the
> instance document that references the redefinition xsd. It appears
> to have created a union of the original and the redefined
> enumeration sets.
> XSV says that only USD and AUD are allowed, treating the redefined
> enumeration set as overriding the original.
> I expected the redefinition to be flagged as an error, with the new
> definition not being a proper subset of the original.
> What is the correct interpretation?

I think your interpretation is the correct interpretation. When you
restrict a simple type, the facets have to be valid restrictions of
the facets of the base type. In your example the base type had a value
space of (USD, EUR); the derived type had an enumeration facet of

According to the XML Schema Datatypes Rec, Section Constraints
on enumeration Schema Components:

  Schema Component Constraint: enumeration valid restriction

  It is an ˇerrorˇ if any member of {value} is not in the ˇvalue
  spaceˇ of {base type definition}.

The restriction is therefore an error because the value 'AUD' is not
in the value space of the base type.



Jeni Tennison
Received on Saturday, 5 January 2002 08:14:58 UTC

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