User-Defined Data types : Simple Type « XML Schema « XML Tutorial






You can create custom user-defined data types using the <simpleType> definition: 

<simpleType name="name of the simpleType" 
            final="#all or list or union or restriction"> 

To declare a <simpleType>, you must always base your declaration on an existing data type. 
The existing data type may be a built-in XML Schema data type or a custom datatype. 
<simpleType>definitions are often called derived types. 

There are three primary derived types: 

Restriction types 
List types 
Union types








3.53.Simple Type
3.53.1.Declaring an Element with a Simple Type
3.53.2.Simple Type Definitions
3.53.3.XML Schemas provide a number of built-in simple types.
3.53.4.User-Defined Data types
3.53.5.The simple type may be defined globally, as a child of an attribute declaration, or within an element content model
3.53.6.A ISO date without a time zone
3.53.7.An anonymous simple string datatype for which any one of three literal string patterns (Small, Medium, or Large) are acceptable