Chapter 9. Using Regular Expressions to Specify Simple Datatypes

Among the many facets available for restricting simple datatypes, the most flexible is based on regular expressions. The pattern facet can be a last resort when all the other facets are unable to express needed restrictions on a user-defined datatype.

Warning

There is a terminology clash between RELAX NG’s patterns and the pattern facet of W3C XML Schema. To limit the risk of confusion, I refer to the facet as the pattern facet or “regular expression.”

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.