Extensibility

Defining types in XML Schemas is no different from defining types in other languages or systems. Invariably, one defines a type in order to reuse it in multiple contexts. Assuming that the original type definition is perfect for the new context, the techniques for associating types with elements and attributes discussed so far are sufficient to achieve reuse. However, it is often the case that the new context really requires a somewhat modified version of an existing type. Fortunately, XML Schemas support several extensibility models that allow a type to be further refined or enhanced without modifying its original definition.

The simplest form of extensibility is the use of wildcards. Wildcard declarations allow unanticipated elements ...

Get Essential XML: Beyond Markup 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.