Why does XSD require determinism?

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

Comments

kpako@yahoo.com (Dare Obasanjo) wrote RE: Why does XSD require determinism?
on 08-16-2004 10:22 AM
XSD requires determinism because it makes implementations simpler. However experience has shown that it may have made sense to special case wild cards w.r.t. determinism.

PS: You could have just asked the folks that are implementing XSD at MSFT instead of posting in your blog. I'm sure you'd have gotten a faster answer. :)
Tim wrote re: Why does XSD require determinism?
on 08-16-2004 10:28 AM
Yes, I could have asked internally, but I wanted to share. Determinism may make the implementation of validators simpler (though, as I noted, that theme doesn't seem to carry through the design), but it makes the design of XML languages harder (at least, if you want to describe them with XSD). It would have been better if the few folks implementing validators suffered, not the many people trying to use XSD to describe their XML.

Of course, maybe I feel that way because I'm in the latter group.

Tim-
Christof Claessens' WebLog wrote About XML Schema's determism requirement...
on 08-17-2004 5:36 AM
dmzwbiam wrote re: Why does XSD require determinism?
on 05-20-2009 8:44 AM

vOoSEJ  <a href="qbrilpjzdggk.com/.../a>, [url=http://giadctnbjgmu.com/]giadctnbjgmu[/url], [link=http://ybmycpvpnqzs.com/]ybmycpvpnqzs[/link], http://pvivjqhjkbzu.com/

xkfwlqi wrote re: Why does XSD require determinism?
on 05-25-2009 7:56 PM

2tcCxH  <a href="pnpsguqqvltz.com/.../a>, [url=http://nkeibvzfciol.com/]nkeibvzfciol[/url], [link=http://xwlnugofzqjl.com/]xwlnugofzqjl[/link], http://dqmgfwsvnwra.com/

Add a Comment

(required)  
(optional)
(required)  
Remember Me?