simpleType redefinition - must it be a restriction?

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

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

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"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:redefine>

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


----------------------------------------------------------------------------
----
 
Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188 
XML Architect                                     [e]
mfeblowitz@frictionless.com
400 Technology Square, 9th Floor 
Cambridge, MA 02139 
www.frictionless.com  
 

Received on Friday, 4 January 2002 14:40:07 UTC