Chapter 14 Deriving complex types

In the previous chapter, we saw how to define new complex types that were not specifically derived from another type. This chapter covers the complexities of deriving complex types from other types, both complex and simple.

14.1 Why derive types?

XML Schema allows you to derive a new complex type from an existing simple or complex type. While it is always possible to make a copy of an existing type and modify it to suit your needs, using type derivation has a number of advantages:

Subsetting.If you want to define a more restrictive subset of a schema, the best way to do this is using restriction. Your schema processor will validate that you have in fact defined a legal ...

Get Definitive XML Schema now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.