What good is Restriction?

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