This is a single archived entry from Stefan Tilkov’s blog. For more up-to-date content, check out my author page at INNOQ, which has more information about me and also contains a list of published talks, podcasts, and articles. Or you can check out the full archive.

W3C XML Schema vs. RELAX NG

Stefan Tilkov,

Mark Nottingham writes about the problems with XML Schema, and makes a case for development of a new data model with a mapping to the XML infoset. There’s an interesting follow-up from Tim Ewald, and a follow-up on that one from Dare Obasanjo. Dare argues that XSD is preferable over RELAX NG for the most usual use case — the mapping of objects or (shudder) database tables to XML and back, and he’s probably right. I still believe that even though most, if not all, Web services toolkits provide a facility to do this mapping, this doesn’t mean that it’s a good thing. I recently co-authored an article comparing XSD and RELAX NG (it’s going to appear in next month’s iX, a German magazine). One of the things we did for that was to actually compare the specs’ sizes. It turns out that the XSD spec is about 10 times as large as that of RELAX NG (still 6 times as large if you don’t count the datatype part). Inspite (or because of?) that RELAX NG is simpler, has a sound underlying model, is more XML-like, and probably superior in many other ways to XSD as well.