Share via


XDR Schema Data Types

The following table shows the data types used in XML-Data Reduced (XDR) schemas.

XDR Data Type Description Corresponding type in DTD

bin.base64

MIME-style Base64 encoded binary BLOB (binary large object).

Not used

bin.hex

Hexadecimal-encoded binary data.

Not used

boolean

A value of either 0 or 1.

Example: 0=="false" and 1=="true"'

Not used

char

A number corresponding to the Unicode representation of a single character.

Not used

date

A date in a subset of the ISO 8601 format, without the time data.

Example: "1994-11-05"

Not used

dateTime

A date in a subset of the ISO 8601 format, with optional time and no optional zone. Fractional seconds can be as precise as nanoseconds.

Example:"1988-04-07T18:39:09"

Not used

dateTime.tz

A date in a subset of the ISO 8601 format, with optional time and optional zone. Fractional seconds can be as precise as nanoseconds.

Example: "1988-04-07T18:39:09-08:00"

Not used

entity

A reference to an unparsed entity. Requires a matching <!ENTITY> declaration for each instance of the entity.

Not used

entities

A list of entities delimited by white space.

Not used

enumeration

Similar to nmtoken, but with an explicit list of allowed values (supported on attributes only).

Example: "Red Blue Green"

Enumeration

fixed.14.4

A number with no more than 14 digits to the left of the decimal point and no more than 4 to the right.

Example: 9999.0044

Not used

float

A real number, with no limit on the digits (2.2250738585072014E-308 - 1.7976931348623157E+308).

Example: 111, 3.14, -123.456E+10

Not used

i1

A one-byte integer, with optional sign (-128 to 127).

Example: 1, 127, -128

Not used

i2

A two-byte integer with optional sign (-32768 to 32767).

Example: 1, 703, -32768

Not used

i4

A four-byte integer with optional sign (-2147483648 to 2147483647).

Example: 1, 703, -32768, 148343, -1000000000

Not used

i8

An eight-byte integer with optional sign (-9223372036854775808 to 9223372036854775807).

For example: 1, 703, -32768, 1483433434334, -1000000000000000

Not used

id

A value that identifies an attribute as an id type attribute. The id values must be unique throughout the document.

In a document, idref(s) attributes refer to an id type attribute, thus forming a relationship similar to primary key and foreign key in relational databases.

Example: Cust1

ID

idref

A value corresponding to an id type, thus enabling intra-document links.

Example: Cust1

IDREF

idrefs

Similar to idref, except it contains multiple id type values separated by white space.

Example: Cust1 Cust2 Cust3

IDREFS

int

A signed integer.

Example: 11123, -123

Not used

nmtoken

Values that conform to the rules of the name token.

Example: Cust1

NMTOKEN

nmtokens

Similar to nmtoken, except it can have a list of nmtoken values separated by white space.

Example: Cust1 Cust2 Cust3

NMTOKENS

notation

A NOTATION type

Not used

number

A number with no limits on the digits (2.2250738585072014E-308 - 1.7976931348623157E+308).

Example: 111, 3.14, -123.456E+10

Not used

r4

Same as float but only four-byte encoding (1.17549435E-38 - 3.40282347E+38).

Not used

r8, float

A floating point number. This data type only supports 15 digits of precision (2.2250738585072014E-308 - 1.7976931348623157E+308).

Not used

string

A string.

Example: "This is a string"

CDATA

time

A time in a subset of the ISO 8601 format with no date and no time zone.

Example: "08:15:27"

Not used

time.tz

A time in a subset of the ISO 8601 format with no date but optional time zone.

Example: "08:15:27-05:00"

Not used

ui1

A one-byte unsigned integer (0 to 255).

Example: 1, 255

Not used

ui2

A two-byte unsigned integer (0 – 65535).

Example: 1, 255, 65535

Not used

ui4

A four-byte unsigned integer (0 – 4294967296).

Example: 1, 703, 3000000000

Not used

ui8

An eight-byte unsigned integer (0 – 18446744073709551615).

Example: 1483433434334

Not used

uri

A Uniform Resource Identifier (URI).

Example: "urn:schemas-microsoft-com:Office9"

Not used

uuid

Hexadecimal digits representing octets with optional embedded hyphens that are ignored.

Example: 333C7BC4-460F-11D0-BC04-0080C7055A83

Not used

See Also

Reference

XDR Schema Data Types Reference
Primitive XDR Schema Data Types
Supported Data Type Conversions
XDR Reference