Related to my last post, I've been wondering why XSD requires determinism. Scott Short wrote to ask me if it was to make validation easier. I suppose it might, but its not requirement with other schema languages. More importantly, though, if the goal were really to make validation easier, wouldn't getting rid of complex type derivation by restriction have been a better step?
I've been thinking that it might have to do with mapping to other type systems. If you don't have an unambigous way to validate, it's hard to know where the data you are validating will map to in an object model. That may or may not be what you want to do with your data, but it was certainly a design pressure on the XSD working group.
I asked Martin about it when I saw him in Redmond last week. He suggested that it was because DTDs were deterministic. I can believe it; after all, the list of attributes comes at the end of a complex type because it reflects the structure of a DTD (even though the attributes appear on an element's start tag, before any of it's content).
Who knows...
Posted
Aug 16 2004, 11:23 AM
by
tim-ewald