W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2003

meaning and usefulness of block and blockDefault

From: Alain Andrieux <a_andrieux@hotmail.com>
Date: Thu, 14 Aug 2003 07:03:09 -0700
Message-Id: <5.1.0.14.1.20030814070306.028a5d40@localhost>
To: W3C XML Schema Comments list <www-xml-schema-comments@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
instantiate 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" then as opposed to
final="#all"?

--
Alain
Received on Thursday, 14 August 2003 09:03:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:01 UTC