Thursday, June 09, 2005

XSD aka W3C XML Schema

There is a great discussion of XSD on XML-DEV happening right now. See this months thread index (http://lists.xml.org/archives/xml-dev/200506/threads.html) and look for "Document oriented experience reports anyone?" for some choice comments. My favorite so far comes from Robin Berjon
...the syntax of XML Schema was obviously produced by someone who grew up at the bottom of a deep well in the middle of a dark, wasteful moor where he was tortured daily by abusive giant squirrels and wishes to share his pain with the world.


XSD is both a necessary and unfortunately ugly reality. While there exist alternatives (RelaxNG, Schematron, DTDs) none of them quite cover the spread of scenarios that XSD does. The downside of XSDs breadth is that it is arduously complicated. My team has spent more time working out ugly edge cases in our XSD code than any other standard. (Although I bet XQuery would likely become a close competitor if we had chosen to implement it.) XSD demonstrates both the angels and demons of design by committee. XSD is mostly acceptable to a much wider variety of real use-cases, more so than any of the competitors. Then there is the momentum issue... Microsoft choose to back XSD. Even in System.Xml implemented support for RelaxNG (for example) it would take years to push support into BizTalk, Office, SqlServer, etc... Such a shift would be a huge undertaking that would have ripple effects throughout the company. Thus it is that good-enough preserves its foothold, despite the potential of something better.

2 Comments:

Anonymous Anonymous said...

I never knew about Henry Thompson's tragic childhood before :-)

5:40 PM  
Anonymous Michael said...

As long as you don't implement the XQuery validate expression, XQuery is much simpler and less complex than XML Schema. Take my word for it. Even the type system of XQuery is simpler than all of XSD. Unfortunately not the type definition system (yet, I personally hope...).

8:27 PM  

Post a Comment

<< Home