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:
XSD 1.1 Built-in Datatypes

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

 About This Book

 Introduction to XML Schema

 XML Editor and Schema Processor - XMLPad

 Java API for XML Processing - JAXP

 JAXP - XML Schema (XSD) Validation

 Xerces2 Java Parser - Java API of XML Parsers

 Using Xerces2 Java API

 XML Schema Language - Basics

Introduction of XSD Built-in Datatypes

Overview of XSD 1.1 Built-in Datatypes

 List of Built-in Datatypes

 Datatypes, Values and Representations

 Datatypes, Values and Representations - Example

 Built-in Datatypes Lexical Representation Examples

 Declaring Elements and Attributes with Built-in Datatypes

 Defining New Datatypes with Built-in Datatypes

 "anyType" Built-in Datatype Values and Representations

 "anySimpleType" Built-in Datatype Values and Representations

 "anyAtomicType" Built-in Datatype Values and Representations

 "string" and Its Derived Datatypes

 "decimal" and Its Derived Datatypes

 "dateTime" and Its Related Datatypes

 Miscellaneous Built-in Datatypes

 Facets, Constraining Facets and Restriction Datatypes

 "simpleType" - Defining Your Own Simple Datatypes

 Complex Element Declaration

 Identity-Constraints: unique, key and keyref

 Assertion as Custom Validation Rules

 XML Schema Location and Namespace in XML Documents

 Overriding Element Types in XML Documents

 Linking Multiple Schema Documents Together

 Glossary

 References

 PDF Printing Version