- From: Mark Feblowitz <mfeblowitz@frictionless.com>
- Date: Fri, 4 Jan 2002 14:38:18 -0500
- 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 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