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

What good is Restriction?

From: Gary Cramblitt <garycramblitt@comcast.net>
Date: Mon, 08 Jul 2002 17:41:18 -0400
To: xmlschema-dev@w3.org
Message-id: <3D29CEBE.22213.240880@localhost>

Quoting from the XML-Schema Primer, when deriving a new type 
by restricting a base complex type...
---
Notice that types derived by restriction must repeat all the 
components of the base type definition that are to be included 
in the derived type
---
So if I must repeat everything in the base type as well as the 
restrictions, what good is it?  Why not just create a new type 
and be done with it?  My conclusion is that while XSD claims 
to be object oriented, it doesn't support full inheritance, at least 
not in this instance.  Maybe this is similar to Microsoft's  
"Interface Inheritance"?  Anybody know why this requirement 
was put in the spec?  Just wondering...

Thanks

--
Gary Cramblitt
garycramblitt@comcast.net
Received on Monday, 8 July 2002 17:47:26 UTC

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