Chapter 6. More Complex Patterns

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.

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.