RE: simpleTypes and final

> -----Original Message-----
> From:	Bob Schloss/Watson/IBM [SMTP:rschloss@us.ibm.com]
> Sent:	Wednesday, October 25, 2000 8:25 AM
> To:	www-xml-schema-comments@w3.org
> Subject:	simpleTypes and final
> 
> First, congratulations on release CR specs....
> 
Thanx!

> A question:
> 
> The Primer (24 Oct) section 4.8 paragraph 2 says that you can prevent
> a particular simple type from having types derived from it.
> 
Actually, what the primer says is [1]

	Another type-derivation mechanism controls which facets
	can be applied in the derivation of a new simple type. When
	a simple type is defined, the fixed attribute may be applied
	to any of its facets to prevent a derivation of that type from
	modifying the value of the fixed facets.

Thus, what can be fixed is not the type itself, but the value assigned to a
particular facet.  The result of fixing a facet value is say that that facet
cannot be used to restrict the value space in a type derived from the
current type.  It is not an error to include a fixed attribute in a derived
type, as long as the value specified in the derived type is the same as that
specified in the base type (where the facet was fixed).

> The Datatype spec (24 Oct) section 5.1 does not indicate that the
> final attribute can be specified on the simpleType element information
> item.
> 
That's right, because "fixed" is not a property of the simpleType; rather,
it is a property of individual facets.  For more details, see the various
sub-sections of 4.2 of Part 2: Datatypes [2].

> What is the mechanism for preventing derived types from being
> created from a particular simple type?
> 
Well, technically, there is none.  However, if you fixed all facets in a
given type, then any type you (legally) derive from it is guaranteed to have
the same value space.

pvb

References
[1] http://www.w3.org/TR/xmlschema-0/#restrictingTypeDerivs
[2] http://www.w3.org/TR/xmlschema-2/#dc-facets

Received on Wednesday, 25 October 2000 14:22:51 UTC