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 04:23:56 UTC