Simon Willison’s Weblog

Subscribe

Compact XML Schemas with Relax NG

10th July 2003

Tim Bray has cooked up a RelaxNG schema for the 0.1 Necho/Pie/Fecho/!Echo snapshot (they really need to hurry up and decide on a name). I had never looked at RelaxNG before, although I had vaguely picked up that it was a lot nicer than the W3C’s XML Schema format. Tim has used RelaxNG Compact, a shorthand method of writing schemas that uses a curly-braces style language instead of XML. It’s suddenly got me very interested—the compact format is instantly readable and looks a lot more efficient to use than DTDs or an XML schema language. Best of all, there are tools to instantly convert compact syntax in to a full RelaxNG XML schema, and then convert that in to XML Schema (should you want to do so). The Compact Syntax tutorial gives a good overview of how the compact syntax works. Now if only there was a Relax NG validation tool in PHP...

This is Compact XML Schemas with Relax NG by Simon Willison, posted on 10th July 2003.

Next: Clearout

Previous: Terms and Conditions

Previously hosted at http://simon.incutio.com/archive/2003/07/10/compactSchemas