Fwd: LC-166 alignment of simple and complex types

This note should have been copied to the XML Schema comments list.

>Date: Mon, 09 Oct 2000 21:05:34 -0600
>To: Philip Wadler <wadler@research.bell-labs.com>, Paul Cotton 
><pcotton@microsoft.com>, W3C XML Query WG <w3c-xml-query-wg@w3.org>
>From: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>
>Subject: LC-166 alignment of simple and complex types
>
>Dear Philip, Paul, and members of the XML Query WG:
>
>The W3C XML Schema Working Group has spent the last several months
>working through the comments received from the public on the last-call
>draft of the XML Schema specification.  We thank you for the comments
>you made on our specification during our last-call comment period, and
>want to make sure you know that all comments received during the
>last-call comment period have been recorded in our last-call issues
>list (http://www.w3.org/2000/05/12-xmlschema-lcissues).
>
>Among other issues, you raised (separately) the point registered as
>issue LC-166, which suggests that there is a lack of orthogonality in
>XML Schema in that simple and complex types may not always be used in
>the same way, and proposes that the names of simple types be allowed
>wherever the names of complex types can be used.
>
>We agree that there should be orthogonality in this area, but are
>puzzled by your claim that there is none.  With two exceptions, the
>names of simple and of complex types can in fact be used in the same
>places.
>
>   (1) Only simple types are allowed as the types of attributes.  This
>   is a consequence of the basic design of SGML and XML; it is not
>   feasible for XML Schema to change it.
>
>   (2) Simple types may not be derived from complex types, and thus the
>   base type definition of a simple type must be a simple type and not
>   a complex type.
>
>We believe, that is, that with respect to the definition of complex
>types (which is the context you appear to have in mind), the state of
>affairs you describe as your goal is already the case.
>
>Your messages suggest a number of consequences which would, you
>suggest, follow from the change you request.  It is the belief of some
>members (at least) of the XML Schema WG that this list of consequences
>would follow not from allowing simple types to be named wherever
>complex types may be named, but from allowing them to be named as
>particles within complex types in the same way that elements may be
>named; since this is not currently legal for complex types, this would
>mean introducing, not eliminating, a lack of orthogonality between
>simple and complex types.
>
>The proposal to allow simple types to occur as particles within
>complex types (so that in an element like <frac>143<bar/>798</frac>
>the "143" and the "798" could each be typed as integers) is similar to
>the proposal (in issue LC-51) to introduce an analog to the #PCDATA
>particle in SGML element type declarations.  The WG declined to make
>that change, partly because it would make content models more complex,
>and partly because it would reintroduce some form or other of the
>extremely vexing complications for parsers which are well known in
>SGML (usually referred to as "the mixed-content gotcha") and have been
>mercifully eliminated from XML.  The addition of type information to
>the question (i.e. using references to simple types instead of a
>PCDATA particle) further increases the complexity, and does not make
>the proposal any more attractive.
>
>The most serious reason to decline the proposal, however, is this: The
>simple fact that in some places within the element, character data is
>allowed, and in other cases it is forbidden, suggests that there is
>some semantic difference between those two regions. But it is an
>inherently questionable design (if not necessarily always a wrong
>design) to identify an important semantic unit and then to define no
>element type in the markup language corresponding to that semantic
>unit. The WG did not feel any pressing urge to make it easy to
>implement, in a schema, such questionable design decisions.
>
>The fact that the change you propose would introduce an unmotivated
>difference between the treatment of simple and complex types is also
>an argument against it which we expect you will appreciate.
>
>It would be helpful to us to know whether you are satisfied with the
>decision taken by the WG on this issue, or wish your dissent from the
>WG's decision to be recorded for consideration by the Director of the
>W3C.
>
>with best regards,
>
>-C. M. Sperberg-McQueen
>  World Wide Web Consortium
>  Co-chair, W3C XML Schema WG

Received on Monday, 9 October 2000 17:18:37 UTC