Appendix A. DSDL

Although RELAX NG started as a standalone project under the auspices of the Organization for the Advancement of Structured Information Standards (OASIS), RELAX NG is now being standardized at ISO (ISO/IEC JTC1 SC34 WG1, to be precise) as a part of a multipart standard named DSDL (see http://dsdl.org).

DSDL (Document Schema Definition Languages) recognizes that the validation of XML documents is a subject too wide and complex to be covered by a single language. It also acknowledges that the industry needs a set of simple and dedicated languages to perform different validation tasks—as well as a framework in which these languages may be used together.

Validating (or schematizing) XML documents may involve:

  • Validating the structure of the document: i.e., checking the containment of elements and attributes (this is the domain in which RELAX NG is very good).

  • Validating the content of each text node and attribute independently of each other (this is where datatype libraries are needed).

  • Validating integrity constraints between different elements and attributes.

  • Validating any other rules (often called business rules).

Throughout this book, you’ve seen that RELAX NG is simple and efficient because it stays focused on solving one—and only one—problem. There are huge gaps that can’t be covered by RELAX NG. For instance, if an XML vocabulary includes mixed-content models, you can’t restrict the content of your documents to ASCII; neither can you define that the content of your ...

Get RELAX NG now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.