- From: Mark Feblowitz <mfeblowitz@frictionless.com>
- Date: Fri, 11 Jan 2002 08:53:00 -0500
- 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] mfeblowitz@frictionless.com 400 Technology Square, 9th Floor Cambridge, MA 02139 www.frictionless.com -----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: 2.3.2.1 If D's {base type definition} is complex, then it must be validly derived from B given the subset as defined by this constraint. 2.3.2.2 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). http://www.w3.org/TR/xmlschema-1/#cos-ct-derived-ok 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. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Friday, 11 January 2002 08:53:34 UTC