Parts of Data Types

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XML Schemas

Parts of Data Types

Data types consist of three parts:

  • value space
  • lexical space
  • facets (fundamental or constraining)

Value space

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

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

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.

Fundamental Facets

There are five fundamental facets.

Equal
Different values can be compared and determined to be equal or not.
Ordered
For some data types, defined relationships exist between values.
Bounded
Order data types may be constrained to a range of values.
Cardinality
The number of values within the value space.
Numeric

Constraining 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