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

simpleType redefinition - must it be a restriction?

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Fri, 4 Jan 2002 14:38:18 -0500
Message-ID: <4DBDB4044ABED31183C000508BA0E97F024D567F@fcpostal.frictionless.com>
To: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>
Cc: "Henry Thompson (E-mail)" <ht@cogsci.ed.ac.uk>, "'support@xmlspy.com'" <support@xmlspy.com>, "'al@altova.com'" <al@altova.com>
Must a redefinition of a simpleType result in a more constrained simpleType?
Or can it be less constrained?

Say I have a simpleType CurrencyCode with two enumerated values, USD and

	<xs:simpleType name="CurrencyCode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="USD"/>
			<xs:enumeration value="EUR"/>

Now say I redefine CurrencyCode as follows:

	<xs:redefine schemaLocation="test0.xsd">
		<xs:simpleType name="CurrencyCode">
			<xs:restriction base="CurrencyCode">
				<xs:enumeration value="USD"/>
				<xs:enumeration value="AUD"/>

I've left USD there, removed EUR, and added AUD. 

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?


Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188 
XML Architect                                     [e]
400 Technology Square, 9th Floor 
Cambridge, MA 02139 
Received on Friday, 4 January 2002 14:40:07 UTC

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