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

Re: Complex Type extension

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 30 Apr 2002 14:44:05 +0100
Message-ID: <112708801522.20020430144405@jenitennison.com>
To: "'Kevin Burges'" <xmldude@burieddreams.com>
CC: xmlschema-dev@w3.org
Priscilla wrote:
> That's invalid. When you are using extension, you can't alter any of
> the attributes of the base type. If you have control over
> CheckGroupType, you could have both CheckGroupType and your new type
> extend the same base type, one with the attribute optional, and one
> with the attribute required. This would allow the content model and
> other attributes to be defined in only one place.

Another option would be to turn the hierarchy around, such that the
type that requires the Logic attribute is derived by restriction from
the type that has an optional Logic attribute. This suffers from the
usual annoyances of derivation by restriction (having to repeat all
the content), though...



Jeni Tennison
Received on Tuesday, 30 April 2002 09:50:41 UTC

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