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

Re: What good is Restriction?

From: Eric van der Vlist <vdv@dyomedea.com>
Date: 09 Jul 2002 00:07:55 +0200
To: Gary Cramblitt <garycramblitt@comcast.net>
Cc: xmlschema-dev@w3.org
Message-Id: <1026166076.29280.161.camel@ibook>

On Mon, 2002-07-08 at 23:41, Gary Cramblitt wrote:
> 
> 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...

There are some few usages within WXS itself for complex type derivation
by restriction (mainly when using xsi:type and substitution groups), but
I think we should consider a derivation by restriction as a declaration
for the applications more than as a feature for schemas themselves.

As you've seen, complex type derivation by restriction isn't so much
about designing modular schemas but about providing (through the PSVI)
to object oriented applications which might know how to handle complex
type "foo" the information that complex type "bar" is a derivation by
restriction and thus that if they know how to deal with "foo" they can
deal with "bar" in the same way.

Hope this helps.

Eric
> 
> Thanks
> 
> --
> Gary Cramblitt
> garycramblitt@comcast.net
> 
> 
-- 
See you in San Diego.
                               http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
Received on Monday, 8 July 2002 18:08:29 UTC

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