- From: Alain Andrieux <aa_vrac@hotmail.com>
- Date: Mon, 4 Aug 2003 15:46:15 -0700
- To: <xmlschema-dev@w3.org>
I am trying to understand how constraining 'block' is, when used on schema types, compared to 'final'. I know 'final' is used to prevent derivation altogether, whereas 'block' prevents only the usage of an instance of the newly derived type. From "XML Schema Part 1: Structures ", about 'block' in a complex type: {prohibited substitutions} determine whether an element declaration appearing in a · content model· is prevented from additionally ·validating· element items with an xsi:type (§2.6.1) attribute that identifies a complex type definition derived by extension or restriction from this definition, or element items in a substitution group whose type definition is similarly derived: If {prohibited substitutions} is empty, then all such substitutions are allowed, otherwise, the derivation method(s) it names are disallowed. Let's say schema A states blockDefault="#all". In schema B , which imports schema A, I can create types derived from the complex types exposed by this schema. I am wondering what is the use of these derived types if I cannot instanciate an element of those types...Is there a namespace subtlety I am missing here? Can I have elements declared in a different namespace that use those derived types or not at all? What is the point of a block="#all" thena as opposed to final="#all"? -- Alain
Received on Monday, 4 August 2003 18:38:32 UTC