- From: Jeff Greif <jgreif@alumni.princeton.edu>
- Date: Fri, 22 Nov 2002 10:00:46 -0800
- To: "Jeni Tennison" <jeni@jenitennison.com>, <xmlschema-dev@w3.org>
Thanks very much, Jeni. 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. 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. 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. Jeff ----- Original Message ----- From: "Jeni Tennison" <jeni@jenitennison.com> To: <xmlschema-dev@w3.org>; "Jeff Greif" <jgreif@alumni.princeton.edu> Sent: Friday, November 22, 2002 6:31 AM Subject: Re: derivation in XML Schema > Hi Jeff, > > > I was unable to determine the answers to these questions by reading > > the 'Structures' part of XML Schema, > > http://www.w3.org/TR/xmlschema-1 > > OK, well I'll give it a shot... > > > 1. Given types B, E, and R where E is an extension of B, and R is a > > restriction of E, is R a restriction or extension of B, or neither? > > Neither. > > > 2. Similarly, given B, E, and R where R is a restriction of B and E > > is an extension of R, is E a restriction or extension of B or > > neither? > > Neither. > > > 3. For the most derived type in each chain (R in the first and E in > > the second), when is it allowed and when prohibited by {prohibited > > substitutions} on B? > > Tests on {prohibited substitutions} (which determine whether or not an > element can be in another element's substitution group or whether you > can use xsi:type to specify a particular type for an element) look at > the entire chain of derivations. So in both cases, if 'extension' or > 'restriction' were in {prohibited substitutions} then you wouldn't be > allowed to have an element of the most derived type in each chain (R > or E) be part of the substitution group of an element of type B and > an element of type B wouldn't be able to use xsi:type to specify the > most derived type in the chain (R or E). > > > 4. For the most derived type in each chain (R in the first and E in > > the second), when is it allowed and when prohibited by {disallowed > > substitutions} on some element declared to have type B? That is, > > with what values of {disallowed substitions} will such an element > > validate with an xsi:type of R and E respectively, and with what > > values will it not validate? > > {disallowed substitutions} has exactly the same effect. The only > value that will enable validation with an xsi:type of R and E > respectively is the empty set. > > Cheers, > > Jeni > > --- > Jeni Tennison > http://www.jenitennison.com/ > >
Received on Friday, 22 November 2002 13:01:05 UTC