- From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
- Date: Wed, 7 Feb 2007 18:56:54 -0700
- To: "Antoli, Leo" <Leo.Antoli@misys.com>
- Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>, Michael Kay <mike@saxonica.com>, xmlschema-dev@w3.org
On 29 Jan 2007, at 10:43 , Antoli, Leo wrote: > Hi all, > > I would be very grateful if somebody could answer this question for > XSD 1.1 spec. draft in [Bug 2837] RQ-125 Clarify identity of > anonymous types (id-anon-types): > > Are anonymous types that appear multiple types in a model group > the same type? Good question. Unfortunately, I don't think I can guarantee that 1.1 will answer it any more than 1.0 did. (Bugzilla reflects the claim made in some WG records that the WG has reached technical agreement on how to resolve this, and says that the only thing missing is that we need to draft wording to do what was agreed. But I have just reviewed the minutes of the meeting where Bugzilla claims this issue was substantively resolved, and from those minutes I cannot tell you the answer to your question.) Some members of the Working Group believe that a spec that appeals to identity, or to distinctiveness, of schema components (as XML Schema does) ought on general principles to explain how to tell when two components are identical and when they are distinct. But others have maintained that this really isn't our problem, and spent a long time resisting any discussion of the matter. They sometimes tell me that they no longer oppose discussing the question, but they succeeded long ago in stopping all forward progress and it's not clear that the Working Group will ever get back to the question. (If you want to make sure we do, then be sure to raise it as a last-call issue, if it's left unspecified in the Last Call draft.) Ultimately, leaving aside the proposals that this isn't really a problem (which I believe everyone now agrees have been discredited), there are two more or less plausible proposals for describing component identity, and thus answering this question. One is to treat components as abstract objects in a mathematical style: bundles of property values. And just as there is only one tuple containing the integers (1, 42, 1764, 74088), however many data structures there may be representing that tuple, so also if all the anonymous types appearing multiple times in a model group have the same values for the same properties, then there is only one such type, and it is used many times. This approach is sometimes resisted on the grounds that it requires implementations to do too much work to avoid having multiple representations of the same type; that argument confuses the abstractions defined by a specification with the data structures used to implement those abstractions. Saying there is only one such type does not mean saying that there must be only one data structure representing that type in the memory space of an implementation. A second is to treat components as objects constructed by a schema processor at schema-acquisition time, and to say, in effect, that you create a type object for each <xsd:complexType> or <xsd:simpleType> element you see in the schema document. For schemas created from schema documents, then, the answer would be "probably not, unless you've found a way to have all those anonymous types declared in the same source declaration." For schemas created in binary form, then, all bets would be off. There might be just one type, there might be several -- any configuration that doesn't violate the constraints on schemas would be legal. There may be other ideas about how to define schema component identity, but these are the only two proposals I can remember that have been brought forward in the working group discussions that actually answer the question and are not self-contradictory. --C. M. Sperberg-McQueen
Received on Thursday, 8 February 2007 01:56:29 UTC