W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2006

Facets "in the same derivation step"

From: Michael Kay <mike@saxonica.com>
Date: Fri, 8 Dec 2006 21:07:46 -0000
To: <xmlschema-dev@w3.org>
Message-ID: <018f01c71b0c$e9212710$6401a8c0@turtle>

Section 4.3.8.4 of Schema Part 2 says:

Schema Component Constraint: maxInclusive and maxExclusive

"It is an .error. for both .maxInclusive. and .maxExclusive. to be specified
in the same derivation step of a datatype definition." 

I can see how to apply this as a constraint on schema documents, but I can't
see how to apply it on schema components. In the schema component model for
a simple type definition (4.1.1), "The value of {facets} consists of the set
of .facet.s specified directly in the datatype definition unioned with the
possibly empty set of {facets} of {base type definition}."

So if a simple type component has both a maxInclusive and a maxExclusive
facet, how am I to determine, by looking at the schema component, whether
these were "specified in the same derivation step"? This seems to require
information that isn't present in the schema component. (I can approximate
by testing whether the facet is present in one type and absent from its base
type, but that doesn't seem to quite reflect the intention.)

See test Microsoft/DataTypes/ 
<test group="test111092_1657" name="test111092_1657"/>

which has maxInclusive on a base type, and maxExclusive on the derived type,
and considers this valid.

Michael Kay
http://www.saxonica.com/
Received on Friday, 8 December 2006 21:08:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:56 GMT