19.3. XML Schemas and Objects

Now that we have reviewed some of the concepts associated with object-oriented development, we can examine how those concepts apply to XML schemas. For each concept—encapsulation, inheritance, and polymorphism—Section 19.4 describes how it is used in XML schemas. For now, let’s just consider to what extent they are available in an XML schema.

19.3.1. The Good

XML schemas have methods for expressing inheritance and polymorphism. Structure types can be derived from other structure types and thus inherit the properties of the base. Structure types defined in an XML schema are polymorphic about any base class they share. XML schemas provide a rich substitution mechanism that allows for polymorphic behavior between ...

Get XML Schema Complete Reference, The 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.