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

Re: derivation in XML Schema

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Fri, 22 Nov 2002 17:13:33 +0100 (MET)
To: Jeni Tennison <jeni@jenitennison.com>
Cc: xmlschema-dev@w3.org.jgreif@alumni.princeton.edu
Message-ID: <9757.1037981613@www31.gmx.net>

I think Jeni hits the bull's eye.

If the situation would be different, i.e. the prohibited / disallowed
substitutions would not be transitive, then it would be possible to insert elements
/ types in between that would cancel the intended constraints.

--Stefan

> 
> 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 11:13:36 GMT

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