by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)


Table of Contents

Who Should Read This Book?
Who Shouldn't Read This Book?
Organization of This Book
Conventions Used in This Book
Comments and Questions
Powered by WikiML

The "X" in XML stands for "Extensible." XML is so extensible that I can invent new elements and attributes as I write XML documents. There is a natural limit to this extensibility; I need to keep track of the elements and attributes that I've created. Then I need to convey to the applications what my document structures will look like. Explaining the new elements and attributes to my application is necessary to help ensure that the application gets information it has a chance of understanding and also to automate some of the most time-consuming (and boring) programming tasks. This is where XML schema languages come into play.

XML schema languages are a nice idea as long as they don't become so complicated that XML vocabularies built using them are difficult to extend. Unfortunately, that's what was starting to happen before RELAX NG (REgular LAnguage for XML, New Generation) appeared. W3C XML Schema, the dominant XML schema language, is so complex and incorporates ideas from so many conflicting fields that it is difficult to learn, difficult to extend—yet its expressive power is still too limited to describe all the possibilities offered by XML! Even though we can expect that many applications will use this mammoth language, many people need a lighter-weight and simpler alternative.

RELAX NG provides that alternative. It is an XML schema language that is:

RELAX NG is easier, more reliable, and safer to use than W3C XML Schema because of two things: RELAX NG has a sound mathematical grounding and focuses on doing a single thing perfectly well—validating the structure of XML documents.

RELAX NG won't do fancy tricks or make you coffee, but if you need a schema language that's easy to use and won't leave you in a labyrinth of obscure limitations, this is the language you should be using. Furthermore, an excellent open source tool (James Clark's Trang) can convert your RELAX NG schemas into other languages, including W3C XML Schema, if you still need to work with W3C XML Schema-based systems. You can work sensibly in RELAX NG but still share your schemas with people who use W3C XML Schema.

This text is released under the Free Software Foundation GFDL.