!!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

*[Preface|RngBookPreface]
Status: Ready for review

!INTRODUCTION

*[Chapter 1:	Relax NG In Perspective|RngBookPerspective]

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.

*[Chapter 2:	Simple Is Beautiful|RngBookPatterns]

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).

*[Chapter 3:	First Schema|RngBookFirstSchema]

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).

*[Chapter 4:	Non XML Syntax|RngBookNonXmlSyntax]

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).

*[Chapter 5:	Flattening Our First Schema|RngBookFlat]

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).

*[Chapter 6:	More Patterns|RngBookMorePatterns]

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.

*[Chapter 7:	Constraining Text Values|RngBookTextPatterns]

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.

*[Chapter 8:	Datatype Libraries|RngBookTypeLibraries]

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.

*[Chapter 9:	W3C XML Schema Regular Expressions|RngBookWxsRegExp]

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.

*[Chapter 10:	Creating Building Blocks|RngBookBuildingBlocks]

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.

*[Chapter 11:	Namespaces|RngNamespaces]

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.

*[Chapter 12:	Writing Extensible Schemas|RngBookExtensible]

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.

*[Chapter 13:	Annotating Schemas|RngBookAnnotations]

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.

*[Chapter 14:	Generating Relax NG schemas|RngBookGeneration]

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.

*[Chapter 15:	Simplification And Restrictions|RngBookRestrictions]
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.

*[Chapter 16:    Determinism And Datatype Assignment|RngBookAssignment]

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).

*[Chapter 17:	Relax NG Elements|RngBookElements]

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.

*[Chapter 18:	Non XML Syntax Reference|RngBookCompact]

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

Status: ready for tech review.

*[Chapter 19:	W3C XML Schema Datatypes|RngBookWxsDatatypes]

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.

*[Chapter 20:	Glossary|RngBookGlossary]
This chapter is a glossary providing a short explanation of the terms used all over the book.

Status: ready for tech review.

!Appendixes

*[Appendix A: DSDL|RngBookDsdl]

Status: ready for tech review.
