- From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
- Date: 26 Jul 2005 08:34:25 -0600
- To: "Moten, Rod" <RMOTEN@bloomberg.net>
- Cc: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
- Message-Id: <1122388465.7899.23.camel@localhost>
On Tue, 2005-07-26 at 07:46, Moten, Rod wrote: > I am writing to propose two requirements > 1. A removal of the constraint that requires elements with the > same name to have the same type. > ... > One problem with XML Schema is the constraint that if two > elements with same name are in the same set of particles of a > model group, then the elements have the same type. The problem > with this constraint is that you cannot ensure that different > occurrences have different structures. This is quite true. What's not clear to me is why one would want to have two elements with the same generic identifier, in the same context, which belong to two different types. Since the usual account of XML's advantages is that it allows us to make explicit aspects of our data that would otherwise be implicit and harder to identify and process reliably, my instinct is to say that if two elements with the same ancestry are supposed to have two different types, then they really ought to have two different generic identifiers. If there is an important relationship between them, that can and should be expressed using type hierarchy, substitution group relations, and/or prose documentation. But perhaps you can persuade me that it's a good idea by explaining why it's important for such a pair of elements to have the same generic identifier but different types. > However, I can define a context free grammar that would accept > the first and reject the second. Again true. It would be a simple decision for the XML Schema WG, if expressive power were the only criterion for language design. But I am inclined to think other things are important, too, and that sometimes an intentionally weaker language is a better design than a stronger language which encourages poor design of XML vocabularies. (You may persuade me that the design you describe is not poor design and deserves to be supported, but I'm not there yet.) I am, of course, speaking only for myself, and your mileage may vary. --C. M. Sperberg-McQueen World Wide Web Consortium
Received on Tuesday, 26 July 2005 14:36:07 UTC