Re: derivation in XML Schema

Hi Jeff,

> I think a general way of summarizing your answers is a derived type
> cannot be used via xsi:type as a replacement for a declared type if
> some kind of derivation is disallowed and that derived type uses
> that form of derivation somewhere in the chain from the declared
> type to the derived type, and similarly for substitution of
> elements.

Right.

> So a restriction of an extension or an extension of a restriction
> will be forbidden as a replacement if either extension or
> restriction are disallowed. From the standpoint of what's
> prohibited, then, an extension of a restriction is both a
> restriction and an extension, while from an abstract view of the
> relationship between the base type and most derived type (or from
> the set theoretic view of the value spaces), it is neither.

Yes, I think so.

> Do you know the reason why the same kind of inheritance doesn't
> apply to the prohibition of derivation itself? If B says it is final
> with respect to restriction, and E extends B, there is no
> prohibition on R restricting E. So if the designer of B thinks he is
> preventing derivation by extension, she must still be careful to
> forbid substitution by extensions which may still be produced by
> inserting a restriction in between.

Hmm... I can't think of anything. Possibly someone in the XML Schema
WG would be able to give us a clue?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Friday, 22 November 2002 13:36:51 UTC