W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

A critique of fundamental facets

From: Markus L. Noga <mlnoga@ipd.info.uni-karlsruhe.de>
Date: Wed, 21 Mar 2001 16:59:03 +0100
To: <www-xml-schema-comments@w3.org>
Message-ID: <NEBBLNMBCKEDFFPICBHBOEIPCAAA.mlnoga@ipd.info.uni-karlsruhe.de>
Hello,

this is my first posting, but I have worked on XML Schema for almost a year
now. For those interested in historic documents, my November 2000 German
Diploma thesis dealing with the March 2000 version of Schemata is available
at http://www.noga.de/markus/XMLSchema/.

Here are some thoughts on fundamental facets as specified in the recently
released March 16th version of XML Schema Part 2. For added spice, two more
general suggestions are included in the pertaining sections.


4.2 Fundamental facets

Unlike orderd and numeric, which define comparison and arithmetic operations
on values, the bounded and final facets provides type information only.
Determining composite bounds or finality induced by a multitude of
interacting facets is hard. On the other hand, declaring de facto bounded
types to be unbounded is a non-option. I suggest scrapping those facets.

From a theoretic viewpoint, the claim that a value is inherited from the
base type definition doesn't hold for most primitive types. This is better
restated completely, using induction roots such as "For primitive types, see
table". All stated rules apply to derived types only.


4.2.1 ordered

The rule for atomic types doesn't reflect totality of order imposed through
other facets such as pattern. This invalidates the claim in section 3.2.6.4.

IMHO partial order only exists to fix the broken date types. I suggest
scrapping the idea of partial order and declaring them unordered, obviating
the pattern problem. Stronger still, scrap simple types for date and time
altogether -- they are composite types without semantic checks, thus better
declared as complex types, or through pattern constraints on strings.

Inheritance critique applies.

Unless partial order is scrapped as suggested, the rule for union types is
malformed -- currently, there is no value of true.

IMHO union types serve only to provide a type to maxOccurs attributes in
schemata. They destroy the type hierarchy. Scrap them, make maxOccurs a
nonNegativeInteger and introduce a boolean attribute unbounded that defaults
to true.


4.2.2 bounded

The rule for atomic types doesn't reflect bounds due to length and pattern
facets or combinations thereof.


4.2.4 cardinality

The rule for atomic types is the same as for boundedness. This is wrong for
arbitrary precision decimals, which require an additional upper bound on the
on the number of digits. In general, an upper bound on length is a
sufficient, yet omitted, condition on its own. The same holds for patterns
describing finite languages.

The rule for lists must be amended by requiring the entries to have finite
value space.

If retained, I suggest naming this facet "finite", which makes it a boolean
and saves a data type in the XML representation.


4.2.5 numeric

Inheritance critique applies.

---
Markus L. Noga                 IPD Goos                Universitšt Karlsruhe
noga@ipd.info.uni-karlsruhe.de
Received on Wednesday, 21 March 2001 10:59:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:50 GMT