W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Block attribute on a complex type

From: Tim Kimber <KIMBERT@uk.ibm.com>
Date: Wed, 19 Mar 2003 12:25:10 +0000
To: xmlschema-dev@w3.org
Message-ID: <OF72DBBD13.669BDD4B-ON80256CEE.003ED03C@portsmouth.uk.ibm.com>


I'm trying to tie down exactly what the 'block' attribute should do when it
appears on a complex type.

XML Schema supports two methods of substitution, which I refer to as 'type
substitution' and 'element substitution'.
 - Type substitution uses the xsi:type attribute to substitute the type of
the element in the instance document.
-  Element substitution uses substitution groups to substitute the element
in the instance document.

I believe that 'block' should affect both type substitution and element
substitution, whether it appears on the element declaration, or on the
element's complex type. This seems to be in agreement with the schema
specification, which says

"Schema Component Constraint: Substitution Group OK (Transitive)
For an element declaration (call it D) together with a blocking constraint
(a subset of {substitution, extension, restriction}, the value of a
{disallowed substitutions}) to be validly substitutable for another element
declaration (call it C) all of the following must be true:
1 The blocking constraint does not contain substitution.
2 There is a chain of {substitution group affiliation}s from D to C, that
is, either D's {substitution group affiliation} is C, or D's {substitution
group affiliation}'s {substitution group affiliation} is C, or . . .
3 The set of all {derivation method}s involved in the derivation of D's
{type definition} from C's {type definition} does not intersect with the
union of the blocking constraint, C's {prohibited substitutions} (if C is
complex, otherwise the empty set) and the {prohibited substitutions}
(respectively the empty set) of any intermediate {type definition}s in the
derivation of D's {type definition} from C's {type definition}. "

The reason for my question is that a very authoritative book on XML schema
claims that 'block' on a complex type does not affect substitution groups
in any way. Can you confirm that this is incorrect?


Tim Kimber
Received on Wednesday, 19 March 2003 07:37:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC