RELAX NG and the Future of XML Schema

This tutorial has painstakingly led you down the path of crafting schemas as XSDs as opposed to using the older DTD technology. Yet another schema technology has emerged that is worth addressing before sending you on your way with XML Schema. I'm referring to RELAX NG (pronounced "relaxing"), which is a schema technology with many of the benefits of XML Schema minus the verbose coding required of XSDs. You can think of RELAX NG as somewhat of a hybrid schema technology that falls somewhere between DTDs and XSDs. RELAX NG schemas represent a dramatic improvement over DTDs in terms of power and flexibility, yet they can be expressed in a compact format that requires less coding complexity than XML Schema. As an example of the difference between RELAX NG and XML Schema, the RELAX NG language consists of 28 elements, whereas XML Schema consists of 42 elements.

So have you wasted an tutorial of your life learning about an overly complex XML schema technology? The answer is a resounding no. XML Schema is still the reigning successor to DTDs, and enjoys considerably more widespread support than RELAX NG. However, given the shorter learning curve and simpler syntax, I would be remiss if I didn't at least mention that RELAX NG is another viable option in terms of developing your own schemas. In fact, RELAX NG allows you to do a few things that aren't even possible in XML Schema. But like I said, RELAX NG is a relatively new technology that has yet to establish itself as an industry-wide XML schema technology. Although I certainly encourage you to learn more about RELAX NG, it's important for you to know how to create schemas as XSDs for the immediate future.

It's tough to speculate about the future of XML Schema and whether or not RELAX NG stands a realistic chance of upending it as the de facto standard for expressing XML schemas. For now, your best bet is to become fluent in XML Schema while possibly starting to get acquainted with RELAX NG if you have a desire to look forward and explore other schema options. The good news is that you've now learned about two different schema technologies, so if RELAX NG ever catches on in a big way you shouldn't have too much trouble learning a third technology. To find out more about RELAX NG, visit the RELAX NG web site at http://www.relaxng.org/.