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...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Tuesday, 30 April 2002 09:50:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT