Describing Document Types: The Schema Languages of XML This tutorial will teach you the basics of several XML schema languages: DTDs, RELAX NG, Schematron, and W3C XML Schema. You will end up understanding the principles of each and their advantages and disadvantages in various applications. Instructor(s): John Cowan, Senior Software Developer, The Associated Press Pre-Requisites: An understanding of basic XML concepts. Knowledge of any XML or SGML schema languages is helpful but certainly not a requirement. Technology Requirements: None. In this tutorial you will learn how to use several of the schema languages for XML. We will begin with a brief survey of XML DTDs, the native but limited XML schema language, and then move on to a detailed survey of RELAX NG. RELAX NG is an evolution and generalization of XML DTDs, and allows you to create easy and intuitive descriptions of just what is and what is not allowed in an XML document. A major goal of RELAX NG is that it be easy to learn and easy to use: it is simple enough to learn in a few hours, and rich and flexible enough to support the design and validation of every kind of document from the very simple to the very complex. We will then discuss Schematron, a completely different kind of schema language from DTDs and RELAX NG. Schematron is based on rules that must be satisified if a document is to validate, rather than patterns that describe its structure. Schematron interworks cleanly with RELAX NG, and can be used to bypass some of RELAX NG's limitations. We'll devote the second half of the tutorial to an exploration of the W3C XML Schema language (WXS). WXS schemas are closer semantically to DTDs, providing some but not all of the extended capabilities of RELAX NG. WXS supports some capabilities not provided in RELAX NG, including keys (identity constraints) and the ability to specify and derive element types. In addition, part 2 of the WXS language provides a rich library of datatypes that can be plugged into RELAX NG schemas as well. This tutorial is presentational rather than hands-on, but your questions are encouraged at any point during the presentation. You should come away from the tutorial with an understanding of the various advantages and disadvantages of the different schema languages for XML.