by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)

More Complex Patterns

Table of Contents

6.1. The group Pattern
6.2. The interleave Pattern
6.3. The choice Pattern
6.4. Pattern Compositions
6.5. Order Variation as a Source of Information
6.6. Text and Empty Patterns, Whitespace, and Mixed Content
6.7. Why Is It Called interleave?
6.8. Mixed Content Models with Order
6.9. A Restriction Related to interleave
6.10. A Missing Pattern: Unordered Group

So far, I've described only sequentially ordered groups of elements and text nodes. Now you'll see another class of patterns that describe unordered sequences and choices. Although this class of patterns has no special name in the RELAX NG specification, I refer to them as compositors in this book in analogy to the compositors that are defined by W3C XML Schema. The W3C's use of the term compositors matches our usage: the name describes patterns composed of less complex patterns, including the basic patterns we've been looking at such as element, attribute, and text.

One of the key differentiations between compositors and simple patterns is that compositors are patterns that don't directly map to any individual element within the schema. I emphasize this distinction because it can be easy to forget when focusing on a schema instead of the instance document.

This text is released under the Free Software Foundation GFDL.