This book is work in progress open to public review. You are welcome to use our annotation system to give your feedback.


Book

Outline

Introduction to RELAX NG is a short (between 250 and 350 pages), concise, professional and practical book focusing on RELAX NG 1.0 (currently an OASIS TC specification).

Introduction to RELAX NG is similar in purpose and level of details to my W3C XML Schema book.

The targeted audience is XML users and developers, familiar with the basics of the XML and namespaces specifications. The reader may eventually know other XML validation or schema techniques but she or he doesn't need to know anything about RELAX NG.

Introduction to RELAX NG aims to be exhaustive in that each RELAX NG element and attribute will be covered both in the user's guide and in the reference guide. The book will include an introduction, a user's guide and a reference guide and the same set of examples will be used all over the book (the subject of these examples needs to be determined).

I don't think a list of tools supporting RELAX NG should be provided in the book, since it is likely to change significantly in the near future and would be quite heavy for a book of this size. I would rather suggest pointing the reader to some pages on the web (including XML.com and other O'Reilly sites) where they can find up to date information.

Outline

Preface

Status: Ready for review

INTRODUCTION

In this chapter I give a short history of the schema languages which have led to RELAX NG and some elements which differentiate RELAX NG from both XML DTDs and W3C XML Schema.

Status: Ready for tech review

USER'S GUIDE

The user's guide is a tutorial showing all the features of RELAX NG through a gentle progression and many examples.

This chapter urges the reader to forget what he may know about W3C XML Schema or DTDs (RELAX NG is about patterns and patterns only and treats elements, attributes and text nodes alike) and explains what a pattern is.

Status: Ready for tech review (the first draft has been heavily updated after a first set of reviews).

Following the structure of the instance document, this chapter gives a first complete schema for our sample application.

Status: Ready for tech review (the first draft has been heavily updated after a first set of reviews).

The XML syntax is simple, natural and reads almost as plain English but is also verbose. In this chapter we see the alternative non XML syntax proposed by James Clark. In the rest of the user's guide, each example will present both syntaxes.

Status: Ready for tech review (the first draft has been heavily updated after a first set of reviews).

Our first schema had been following the structure of our instance document but named patterns are convenient to limit the depth of a schema, provide re-usability or just mimic a DTD.

Status: Ready for tech review (the first draft has been heavily updated after a first set of reviews).

We have seen sequences of elements and to be complete we need to introduce choices and interleaving.

Status: Need to be updated after a first set of reviews.

RELAX NG has chosen to rely on external typing systems and has few constraints to apply on text nodes which we will study in this chapter (namely string vs token types, enumerations and lists).

Status: Need to be updated after a first set of reviews.

In addition to the built-in constraint which we have seen, RELAX NG lets us plug-in datatypes libraries and we will study in this chapter the general mechanism and spend some more time on the plug-in of W3C XML Schema datatypes.

Status: Need to be updated after a first set of reviews.

In this chapter, we see in detail the regular expresssions which can be used in the W3C XML Schema "pattern" facet.

Status: Ready for tech review.

Now that we have now all the blocks, let's see how we can reuse and redefine them in "grammars" which can be merged.

Status: Need to be updated after a first set of reviews.

We discover in this chapter how straightforward is the namespace support in RELAX NG.

Status: Need to be updated after a first set of reviews.

This chapter covers both the extensibility of the schemas themselves and the extensibility of the class of instance documents described by a schema (in other words, its openness).

Status: Need to be updated after a first set of reviews.

Documentation may be targeted to human users but also to other applications and we cover both aspects in this chapter showing for instance how Schematron rules may be embedded in RELAX NG schemas, and covering other annotations systems such as Bob DuCharme's schema document pipeline proposal and my own xvif.

Status: ready for tech review.

This chapter covers generation of Relax NG from sources such as instance documents (Examplotron), UML diagrams, spreadsheets and litterate programming.

Status: ready for tech review.

This chapter goes into the details of the simplification of Relax NG documents described as a normative part of the Relax NG specification which understanding is needed to understand some few obscure limitations of which have not been covered in the user's guide.

Status: ready for tech review.

One of the strengths of Relax NG is to allow non deterministic schemas. While this is extremely convenient for validation purposes, this is an issue for assigning datatypes to the nodes of the instance documents (a controversial feature out of the scope of Relax NG but used by some applications). This chapter presents the concept of schema determinism, the tools to check if a schema is deterministic or not and the works in progress in this domain.

Status: ready for tech review.

SHORT REFERENCE GUIDE

This part is a concise reference guide covering the elements of the RELAX NG XML syntax, the commented EBNF of the non XML syntax, a glossary and a short reference guide for the W3C XML Schema datatypes (adapted from my book about W3C XML Schema).

This chapter is a short reference guide describing all the elements of the XML syntax with their description , synopsis and example.

Status: ready for tech review.

This is pretty much the same reference than the previous one for the non XML syntax.

Status: ready for tech review.

Although not a part of RELAX NG, the W3C XML Schema simple types may be plugged into RELAX NG schemas and this chapter is an adaptation of the short reference published in my W3C XML Schema book.

Status: ready for tech review.

This chapter is a glossary providing a short explanation of the terms used all over the book.

Status: ready for tech review.

Appendixes

Status: ready for tech review.


This book is work in progress open to public review. You are welcome to use our annotation system to give your feedback.

Annotations for this document



Eric van der Vlist - Relax NG - 2002-2003 - page 3/25
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.