Data types consist of three parts:
Value space refers to a set of literal values. Derived types inherit their value space from the base type; derived types are restricted by their base types.
Lexical space refers to the representation of literal values. Lexical space is the set of string literals that represent the values of data types. These literals always consist of text characters from any XML-legal subset of Unicode character set.
Facets are properties of the value space. A facet is one of the defining properties of a data type that distinguishes it from other data types. The World Wide Web Consortium (W3C) defines a facet as a single defining aspect of a value space. Facets provide definition for simple types. A facet is a restriction to a data type.
Facets of a data type serve to distinguish aspects of one data type that differ from other data types. There are two types of facets: fundamental facets and nonfundamental (constraining) facets. Fundamental facets define the data type. Nonfundamental or constraining facets place constraints or restrictions on the data type.
There are five fundamental facets.
Constraining facets limit the values of a derived data type.
There are several constraining facets that can be applied to a derived data type.
enumeration
fractionDigits, totalDigits
length, minLength, maxLength
pattern
minExclusive, maxExclusive, minInclusive, maxInclusive
whiteSpace