Deriving Simple Types

Although there are a number of built-in simple types available for your usage, there are still times when you may want to derive your own new simple types. You can't derive a new simple type from extension, because if you extend a simple type, it becomes a complex type. So, now, let's take a look at deriving new simple types by restriction.

Derivation by Restriction

The most common way of deriving a new simple type is through a restriction. When deriving a new simple type by restriction, what you are doing is manipulating the constraining attributes of the type.

The constraining attributes you have available to change will vary from type to type, so it's always a good idea to check and make sure the attribute you want applies, ...

Get Special Edition Using XML, Second Edition 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.