XSD Tutorials - Herong's Tutorial Examples - v5.23, by Herong Yang
List of Built-in Datatypes
This section lists all built-in datatypes supported in XSD 1.1. 50 built-in datatypes can be divided into 7 categories. 4 new datatypes are introduced in XSD 1.1.
Here is a complete list of 50 built-in datatypes defined in XSD 1.1 specification:
anyType: Special, As the base datatype of all XSD datatypes
all complex types: Placeholder, For user defined complex datatypes
anySimpleType: Special, As the base datatype
anyAtomicType: Special, As the base datatype
anyURI: Primitive, For URI values
base64Binary: Primitive, For base64 encoded data
boolean: Primitive, For Boolean values
date: Primitive, For date values
dateTime: Primitive, For date and time values
dateTimeStamp: Derived, For timestamps
decimal: Primitive, For decimal values
integer: Derived, For integer values
long: Derived, For 64-bit integer values
int: Derived, For 32-bit integer values
short: Derived, For 16-bit integer values
byte: Derived, For 8-bit integer values
nonNegativeInteger: Derived, For non negative integers
positiveInteger: Derived, For positive integers
unsignedLong: Derived, For 64-bit unsigned integers
unsignedInt: Derived, For 32-bit unsigned integers
unsignedShort: Derived, For 16-bit unsigned integers
unsignedByte: Derived, For 8-bit unsigned integers
nonPositiveInteger: Derived, For non positive integers
negativeInteger: Derived, For negative integers
double: Primitive, For 64-bit floating-point values
duration: Primitive, For time duration values
dayTimeDuration: Derived, For time duration values
yearMonthDuration: Derived, For calendar date durations
float: Primitive, For 32-bit floating-point values
gDay: Primitive, For Gregorian calendar day values
gMonth: Primitive, For Gregorian calendar month values
gMonthDay: Primitive, For Gregorian calendar month and day
gYear: Primitive, For Gregorian calendar year values
gYearMonth: Primitive, For Gregorian calendar year and month
hexBinary: Primitive, For HEX encoded data
NOTATION: primitive, For user defined notations
QName: Primitive, For QName values
string: Primitive, For string values
normalizedString: Derived, For strings without \t, \r, \n
token: Derived, For For strings with whitespaces collapsed
language: Derived, For Langage values defined in BCP47
Name: Derived, For XML Name values
NCName: Derived, For XML non-colonized Name values
ENTITY: Derived, For XML ENTITY values
ID: Derived, For XML ID values
IDREF: Derived, For XML IDREF values
NMTOKEN: Derived, For XML NMTOKEN values
time: Primitive, For time values
ENTITIES: List, For lists of ENTITY values
IDREFS: List, For lists of IDREF values
NMTOKENS: List, For lists of NMTOKEN values
As you can see from the above list, 50 XSD 1.1 built-in datatypes can be divided into 7 categories based on the value of their values:
Note that 4 new built-in datatypes are introduced in XSD 1.1:
Table of Contents
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
►Introduction of XSD Built-in Datatypes
Overview of XSD 1.1 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
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