Built-in Types
The W3C XML Schema Language provides 44 built-in simple
types for text strings. Each type has a value space and a lexical
space. The value space is the set of unique meanings for the type,
which may or may not be text. In some sense, the value space is
composed of Platonic forms. The lexical space is the set of text
strings that correspond to particular points in the value space. For
example, the xs:boolean type has
the value space true and false. However, its lexical space contains
four strings: true, false, 0,
and 1. true and 1 both map to the same value true, while
false and 0 map to the single value false. In cases
like this where multiple strings in the lexical space map to a single
value, then one of those strings is selected as the canonical lexical
representation. For instance, the canonical lexical representations of
true and false are the strings true
and false.
The primitive types are organized in a hierarchy. All simple
types descend from an abstract ur-type called xs:anySimpleType , which is itself a descendant of an abstract ur-type
called xs:anyType that includes
both simple and complex types. Simple types are derived from other
simple types by union, restriction, or listing. For example, the
xs:nonNegativeInteger type is derived from the xs:integer type by setting its minInclusive facet to 0. The xs:integer type is derived from the xs:decimal type by setting its fractionDigits facet to 0. Figure 22-1 diagrams the complete hierarchy of built-in types. ...