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

RE: Substitution groups: Is the "or" in "restriction or extension " ex clusive?

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Fri, 11 Jan 2002 08:53:00 -0500
Message-ID: <4DBDB4044ABED31183C000508BA0E97F024D56DD@fcpostal.frictionless.com>
To: "'Jeni Tennison'" <jeni@jenitennison.com>
Cc: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>
So, as I read this, as long as each step (DD derived from D derived from B)
is a valid derivation, then it is ok for dd of type DD to be in the
substitution group b of type B, regardless of whether all of the derivation
steps use the same subset of {extension, restriction}. Is that correct?

(BTW, I don't quite understand number 1 below - could you explain?).
Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188 
XML Architect                                     [e]
400 Technology Square, 9th Floor 
Cambridge, MA 02139 

 -----Original Message-----
From: 	Jeni Tennison [mailto:jeni@jenitennison.com] 
Sent:	Friday, January 11, 2002 4:24 AM
To:	Mark Feblowitz
Cc:	Xmlschema-Dev (E-mail)
Subject:	Re: Substitution groups: Is the "or" in "restriction or
extension" ex  clusive?

Hi Mark,

> For example, if I use the common practice of performing derivation
> by extension and derivation by restriction in separate steps, can
> the result of such a two-step derivation be the legal type of a
> substitution group member?

Yes, no problem. The type must be 'validly derived'. The definition of
'validly derived' in detailed in:

Schema Component Constraint: Type Derivation OK (Complex)

For a complex type definition (call it D, for derived) to be validly
derived from a type definition (call this B, for base) given a subset
of {extension, restriction} all of the following must be true:

1 If B and D are not the same type definition, then the {derivation
method} of D must not be in the subset.
2 One of the following must be true:
2.1 B and D must be the same type definition. 
2.2 B must be D's {base type definition}. 
2.3 All of the following must be true:
2.3.1 D's {base type definition} must not be the ·ur-type definition·. 
2.3.2 The appropriate case among the following must be true: If D's {base type definition} is complex, then it must be
validly derived from B given the subset as defined by this constraint. If D's {base type definition} is simple, then it must be
validly derived from B given the subset as defined in Type Derivation
OK (Simple) (§3.14.6).


Note that the substitution group exclusions (what types are allowed)
get passed down the chain of types. So if the head element has
final="extension" then the type of the member element must not have
been derived by extension in any of the derivation steps.


Jeni Tennison
Received on Friday, 11 January 2002 08:53:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:54 UTC