Derived XML Data Types

The following table lists derived XML schema data types, facets that can be applied to the derived data type, and a description of the derived data type.

For descriptions of the facets, see Data Type Facets.

Data Type Facets Description

normalizedString

length, pattern, maxLength, minLength, enumeration, whiteSpace

Represents white space normalized strings. This data type is derived from string.

token

enumeration, pattern, length, minLength, maxLength, whiteSpace

Represents tokenized strings. This data type is derived from normalizedString.

language

length, pattern, maxLength, minLength, enumeration, whiteSpace

Represents natural language identifiers (defined by RFC 1766). This data type is derived from token.

IDREFS

length, maxLength, minLength, enumeration, whiteSpace

Represents the IDREFS attribute type. Contains a set of values of type IDREF.

ENTITIES

length, maxLength, minLength, enumeration, whiteSpace

Represents the ENTITIES attribute type. Contains a set of values of type ENTITY.

NMTOKEN

length, pattern, maxLength, minLength, enumeration, whiteSpace

Represents the NMTOKEN attribute type. An NMTOKEN is set of name characters (letters, digits, and other characters) in any combination. Unlike Name and NCName, NMTOKEN has no restrictions on the starting character. This data type is derived from token.

NMTOKENS

length, maxLength, minLength, enumeration, whiteSpace

Represents the NMTOKENS attribute type. Contains a set of values of type NMTOKEN.

Name

length, pattern, maxLength, minLength, enumeration, whiteSpace

Represents names in XML. A Name is a token that begins with a letter, underscore, or colon and continues with name characters (letters, digits, and other characters). This data type is derived from token.

NCName

length, pattern, maxLength, minLength, enumeration, whiteSpace

Represents noncolonized names. This data type is the same as Name, except it cannot begin with a colon. This data type is derived from Name.

ID

length, enumeration, pattern, maxLength, minLength, whiteSpace

Represents the ID attribute type defined in the XML 1.0 Recommendation. The ID must be a no-colon-name (NCName) and must be unique within an XML document. This data type is derived from NCName.

IDREF

length, enumeration, pattern, maxLength, minLength, whiteSpace

Represents a reference to an element that has an ID attribute that matches the specified ID. An IDREF must be an NCName and must be a value of an element or attribute of type ID within the XML document. This data type is derived from NCName.

ENTITY

length, enumeration, pattern, maxLength, minLength, whiteSpace

Represents the ENTITY attribute type in XML 1.0 Recommendation. This is a reference to an unparsed entity with a name that matches the specified name. An ENTITY must be an NCName and must be declared in the schema as an unparsed entity name. This data type is derived from NCName.

integer

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents a sequence of decimal digits with an optional leading sign (+ or -). This data type is derived from decimal.

nonPositiveInteger

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer that is less than or equal to zero. A nonPositiveInteger consists of a negative sign (-) and sequence of decimal digits. This data type is derived from integer.

negativeInteger

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer that is less than zero. Consists of a negative sign (-) and sequence of decimal digits. This data type is derived from nonPositiveInteger.

long

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum value of -9223372036854775808 and maximum of 9223372036854775807. This data type is derived from integer.

int

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum value of -2147483648 and maximum of 2147483647. This data type is derived from long.

short

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum value of -32768 and maximum of 32767. This data type is derived from int.

byte

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum value of -128 and maximum of 127. This data type is derived from short.

nonNegativeInteger

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer that is greater than or equal to zero. This data type is derived from integer.

unsignedLong

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum of zero and maximum of 18446744073709551615. This data type is derived from nonNegativeInteger.

unsignedInt

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum of zero and maximum of 4294967295. This data type is derived from unsignedLong.

unsignedShort

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum of zero and maximum of 65535. This data type is derived from unsignedInt.

unsignedByte

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer with a minimum of zero and maximum of 255. This data type is derived from unsignedShort.

positiveInteger

enumeration, fractionDigits, pattern, minInclusive, minExclusive, maxInclusive, maxExclusive, totalDigits, whiteSpace

Represents an integer that is greater than zero. This data type is derived from nonNegativeInteger.

See Also

Reference

XML Data Types Reference
Primitive XML Data Types

Concepts

Data Type Facets