Designing Your own XML Schema: Restrictions and User Defined Types - User-defined Simple Type with enumeration in XML Schema (Page 5 of 7 )
In the previous two sections, we dealt with only the simple type without enumeration. Now, we shall deal with user-defined simple types with the enumeration facet.
Let us consider that I would like to define my own data type called “Category,” which holds all types of employee categories (in the form of an enumeration). The following listing of a complete XML Schema does the same: