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

Re: derivation in XML Schema

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 22 Nov 2002 14:31:12 +0000
Message-ID: <75-1973704287.20021122143112@jenitennison.com>
To: xmlschema-dev@w3.org, "Jeff Greif" <jgreif@alumni.princeton.edu>

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 09:33:58 GMT

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