XSD Tutorials - Herong's Tutorial Examples - Version 5.10, by Dr. Herong Yang
Overview of XSD 1.1 Built-in Datatypes
This section describes what are built-in datatypes defined in XSD 1.1 specification. There are total of 49 built-in datatypes. And 19 of them are primitive datattypes.
Before moving on to more complex XSD schema definitions, we need to have a better understanding of how many built-in datatypes are supported, what are they, and how they are related to each other.
To know many built-in datatypes in XSD 1.1, we can look at this
diagram included in the XSD 1.1 specification:
Here is what I learned from this diagram:
By reading more details in XSD 1.1 specification, I have the following understanding of how built-in datatypes are grouped:
Primitive Datatypes - A primitive datatype has a value set with only original values, which are not shared with other primitive datatypes. For example, "decimal" and "string" are primitive datatypes. "decimal" values represent numerical values. "string" values represent character sequences. They do not share any values.
Derived Datatypes - A derived datatype has a value set derived from another datatype, called the base datatype. The value set of a derived datatype is a subset of the value set of the base datatype. For example, "integer" is a derived datatype, derived from the base datatype, "decimal". "integer" value set is a subset of "decimal" value set. In other words, all valid "integer" values are valid "decimal" values.
Atomic Datatypes - An atomic datatype is a datatype whose values are individual values, not constructed from other values. For example, "NMTOKEN" is an atomic datatype, because its values are individual values. Each "NMTOKEN" value can not be treated as a structure of other datatype values.
List Datatypes - A list datatype is a datatype whose values are lists of other datatype values. For example, "NMTOKENS" is a list datatype, because its values are lists of "NMTOKEN" values.
Last update: 2013.
Table of Contents