Designing Your own XML Schema: Restrictions and User Defined Types - How to define your own simple type (user-defined data type) in XML Schema (Page 3 of 7 )
This is another interesting topic in XML Schema. The XML Schema vocabulary was already defined with plenty of data types, together with “restriction” facets to support broad varieties of information. But there always exists some room for enhancements.
XML Schema vocabulary is extensible. This means you can also define (or extend) your own vocabulary from the existing one.
Coming to our scenario, let us consider that I would like to define my own data type called “AgeType” exclusively for the “Age” element. The following listing of a complete XML Schema does the same: