Appendix
XML Schema Built-In Types
Type | Example | Description |
string | This is a string. | A sequence of legal XML 1 characters. |
normalizedString | This is a normalized string. | A sequence of legal XML 1 characters that does not contain carriage returns, line feeds, or tabs. |
token | Token1 Token2 Token3 | A tokenized string of legal XML 1 characters that does not contain carriage returns, line feeds, or tabs. |
byte | -128 | A numeric value from -128 through 127. |
unsignedByte | 255 | A numeric value from 0 through 255. |
base64Binary | 6e7P | Base64-encoded binary data. Base64 encoding is described in RFC 2045. |
hexBinary | B2AF | Hex-encoded binary data. Each binary octet is encoded into its two-character hexadecimal equivalent. The example has a binary representation of 1011001010101111. |
integer | 123456789 | A numeric value meeting the mathematical definition of an integer. Basically, an infinitely bounded number that can be positive or negative. |
positiveInteger | 123456789 | A numeric value that meets the mathematical definition of a positive integer. Basically, an infinitely bounded positive number, not including zero. |
negativeInteger | -123456789 | A numeric value that meets the mathematical definition of a negative integer. Basically, an infinitely bounded negative number, not including zero. |
nonNegativeInteger | 123456789 | A numeric value that meets the mathematical definition of a non-negative integer. Basically, an infinitely bounded positive number, including zero. |
nonPositiveInteger | -123456789 | A numeric value that meets the mathematical definition of a nonpositive integer. Basically, an infinitely bounded negative number, including zero. |
int | -2147483648 | A numeric value from -2147483648 through 2147483647. |
unsignedInt | 4294967295 | A numeric value from 0 through 4294967295. |
long | -9223372036854775808 | A numeric value from -9223372036854775808 through 9223372036854775807. |
unsignedLong | 18446744073709551615 | A numeric value from 0 through 18446744073709551615. |
short | -32768 | A numeric value from -32768 through 32767. |
unsignedShort | 65535 | A numeric value from 0 through 65535. |
decimal | 1234.56789 | A finite sequence of decimal digits that must contain a single period as a decimal indicator. |
float | - 123.456789E2, -123.456789e2, or -12345.6789 | A numeric value that meets the requirements of the IEEE single- precision 32-bit floating-point type. The legal special values include positive and negative zero (0,- 0), positive and negative infinity (INF, - INF), and not a number (NaN). |
double | -123.456789E2, -123.456789e2, or -12345.6789 | A numeric value that meets the requirements of the IEEE single- precision 64-bit floating-point type. The legal special values include positive and negative zero (0, - 0), positive and negative infinity (INF, - INF), and not a number (NaN). |
boolean | 1 or true | A value containing true or false. |
time | 01:22:15-07:00 | A value containing a specific time of day in the format HH:MM:SS. Midnight is represented as 00:00:00. Time is represented using 24-hour notation. The time zone is indicated by the number of hours after Coordinated Universal Time. (Mountain Standard Time in the U.S. is represented as – 07:00.) |
date | 2001-05-21 | A value containing a calendar day in the format YYYY-MM-DD. |
dateTime | 2001-05-21T01:22:15-07:00 | A value containing a specific instance of time in the format YYYY-MM-DDTHH:MM:SS. |
duration | P3Y1M24DT11H22M10.4S | A value containing a duration of time in the format P#Y#M#DT#H#M#S or any subset, such as P#M#S. |
gMonth | --05-- | A value containing a Gregorian month in the format --MM--. |
gYear | 2001 | A value containing a Gregorian year in the format YYYY. |
gYearMonth | 2001-05 | A value containing a Gregorian month in a particular year in the format YYYY-MM. |
gDay | ---21 | A value containing a recurring Gregorian day of the month in the format ---DD. |
gMonthDay | --05-21 | A value containing a recurring Gregorian day of the month in the format --MM-DD. |
Name | Address | A value containing an XML 1 name. |
QName | po:Address | A value containing a qualified XML 1 name. |
NCName | Address | A value containing a “noncolonized” XML 1 name (a QName without the prefix). |
anyURI | http://www.microsoft.com | A value containing a URI. The URI can be relative or absolute. |
language | en-US | A value containing a natural language identifier as defined by RFC 1766. |
ID |
| A value containing an XML 1 ID attribute type. |
IDREF |
| A value containing an XML 1 IDREF attribute type. |
IDREFS |
| A value containing an XML 1 IDREFS attribute type. |
ENTITY |
| A value containing an XML 1 ENTITY attribute type. |
ENTITIES |
| A value containing an XML 1 ENTITIES attribute type. |
NOTATION |
| A value containing an XML 1 NOTATION attribute type. |
NMTOKEN |
| A value containing an XML 1 NMTOKEN attribute type. |
NMTOKENS |
| A value containing an XML 1 NMTOKENS attribute type. |