Table of contentsAppendices |
3.3 Derived datatypesDerived datatypesThis section gives conceptual definitions for all built-in derived datatypes defined by this specification. The XML representation used to define derived datatypes (whether built-in or user-derived) is given in section [XML Representation of Simple Type Definition Schema Components] and the complete definitions of the built-in derived datatypes are provided in Appendix A [Schema for Datatype Definitions (normative)]. normalizedString[top]normalizedStringnormalizedString represents white space normalized strings. The value space of normalizedString is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters. The lexical space of normalizedString is the set of strings that do not contain the carriage return (#xD) nor tab (#x9) characters. The base type of normalizedString is . Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypestoken[top]tokentoken represents tokenized strings. The value space of token is the set of strings that do not contain the line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The lexical space of token is the set of strings that do not contain the line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The base type of token is . Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypeslanguage[top]languagelanguage represents natural language identifiers as defined by [RFC1766]. The value space of language is the set of all strings that are valid language identifiers as defined in the [language identification] section of [XML]. The lexical space of language is the set of all strings that are valid language identifiers as defined in the [language identification] section of [XML]. The base type of language is . Constraining facets[top]Constraining facetsNMTOKEN[top]NMTOKENNMTOKEN represents the NMTOKEN attribute type from [XML]. The value space of NMTOKEN is the set of tokens that match the Nmtoken production in [XML]. The lexical space of NMTOKEN is the set of strings that match the Nmtoken production in [XML]. The base type of NMTOKEN is . For compatibility (see [Terminology]) NMTOKEN should be used only on attributes. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesNMTOKENS[top]NMTOKENSNMTOKENS represents the NMTOKENS attribute type from [XML]. The value space of NMTOKENS is the set of finite, non-zero-length sequences of NMTOKENs. The lexical space of NMTOKENS is the set of white space separated lists of tokens, of which each token is in the lexical space of [NMTOKEN]. The itemType of NMTOKENS is . For compatibility (see [Terminology]) NMTOKENS should be used only on attributes. Constraining facets[top]Constraining facetsName[top]NameName represents [XML Names]. The value space of Name is the set of all strings which match the Name production of [XML]. The lexical space of Name is the set of all strings which match the Name production of [XML]. The base type of Name is . Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesNCName[top]NCNameNCName represents XML "non-colonized" Names. The value space of NCName is the set of all strings which match the NCName production of [XMLNS]. The lexical space of NCName is the set of all strings which match the NCName production of [XMLNS]. The base type of NCName is . Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesID[top]IDID represents the ID attribute type from [XML]. The value space of ID is the set of all strings that match the NCName production in [XMLNS]. The lexical space of ID is the set of all strings that match the NCName production in [XMLNS]. The base type of ID is . For compatibility (see [Terminology]) ID should be used only on attributes. Constraining facets[top]Constraining facetsIDREF[top]IDREFIDREF represents the IDREF attribute type from [XML]. The value space of IDREF is the set of all strings that match the NCName production in [XMLNS]. The lexical space of IDREF is the set of strings that match the NCName production in [XMLNS]. The base type of IDREF is . For compatibility (see [Terminology]) this datatype should be used only on attributes. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesIDREFS[top]IDREFSIDREFS represents the IDREFS attribute type from [XML]. The value space of IDREFS is the set of finite, non-zero-length sequences of [IDREF]s. The lexical space of IDREFS is the set of white space separated lists of tokens, of which each token is in the lexical space of [IDREF]. The itemType of IDREFS is . For compatibility (see [Terminology]) IDREFS should be used only on attributes. Constraining facets[top]Constraining facetsENTITY[top]ENTITYENTITY represents the ENTITY attribute type from [XML]. The value space of ENTITY is the set of all strings that match the NCName production in [XMLNS] and have been declared as an [unparsed entity] in a [document type definition]. The lexical space of ENTITY is the set of all strings that match the NCName production in [XMLNS]. The base type of ENTITY is . NOTE: For compatibility (see [Terminology]) ENTITY should be used only on attributes. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesENTITIES[top]ENTITIESENTITIES represents the ENTITIES attribute type from [XML]. The value space of ENTITIES is the set of finite, non-zero-length sequences of ENTITYs that have been declared as [unparsed entities] in a [document type definition]. The lexical space of ENTITIES is the set of white space separated lists of tokens, of which each token is in the lexical space of [ENTITY]. The itemType of ENTITIES is . NOTE: For compatibility (see [Terminology]) ENTITIES should be used only on attributes. Constraining facets[top]Constraining facetsinteger[top]integerinteger is derived from [decimal] by fixing the value of fractionDigits to be 0. This results in the standard mathematical concept of the integer numbers. The value space of integer is the infinite set {...,-2,-1,0,1,2,...}. The base type of integer is . Lexical representation[top]Lexical representationinteger has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39) with an optional leading sign. If the sign is omitted, "+" is assumed. For example: -1, 0, 12678967543233, +100000. Canonical representation[top]Canonical representationThe canonical representation for integer is defined by prohibiting certain options from the [Lexical representation]. Specifically, the preceding optional "+" sign is prohibited and leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesnonPositiveInteger[top]nonPositiveIntegernonPositiveInteger is derived from [integer] by setting the value of maxInclusive to be 0. This results in the standard mathematical concept of the non-positive integers. The value space of nonPositiveInteger is the infinite set {...,-2,-1,0}. The base type of nonPositiveInteger is . Lexical representation[top]Lexical representationnonPositiveInteger has a lexical representation consisting of a negative sign ("-") followed by a finite-length sequence of decimal digits (#x30-#x39). If the sequence of digits consists of all zeros then the sign is optional. For example: -1, 0, -12678967543233, -100000. Canonical representation[top]Canonical representationThe canonical representation for nonPositiveInteger is defined by prohibiting certain options from the [Lexical representation]. Specifically, the negative sign ("-") is required with the token "0" and leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesnegativeInteger[top]negativeIntegernegativeInteger is derived from [nonPositiveInteger] by setting the value of maxInclusive to be -1. This results in the standard mathematical concept of the negative integers. The value space of negativeInteger is the infinite set {...,-2,-1}. The base type of negativeInteger is . Lexical representation[top]Lexical representationnegativeInteger has a lexical representation consisting of a negative sign ("-") followed by a finite-length sequence of decimal digits (#x30-#x39). For example: -1, -12678967543233, -100000. Canonical representation[top]Canonical representationThe canonical representation for negativeInteger is defined by prohibiting certain options from the [Lexical representation]. Specifically, leading zeroes are prohibited. Constraining facets[top]Constraining facetslong[top]longlong is derived from [integer] by setting the value of maxInclusive to be 9223372036854775807 and minInclusive to be -9223372036854775808. The base type of long is . Lexical representation[top]Lexical representationlong has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed. For example: -1, 0, 12678967543233, +100000. Canonical representation[top]Canonical representationThe canonical representation for long is defined by prohibiting certain options from the [Lexical representation]. Specifically, the the optional "+" sign is prohibited and leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesint[top]intint is derived from [long] by setting the value of maxInclusive to be 2147483647 and minInclusive to be -2147483648. The base type of int is . Lexical representation[top]Lexical representationint has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed. For example: -1, 0, 126789675, +100000. Canonical representation[top]Canonical representationThe canonical representation for int is defined by prohibiting certain options from the [Lexical representation]. Specifically, the the optional "+" sign is prohibited and leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesshort[top]shortshort is derived from [int] by setting the value of maxInclusive to be 32767 and minInclusive to be -32768. The base type of short is . Lexical representation[top]Lexical representationshort has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed. For example: -1, 0, 12678, +10000. Canonical representation[top]Canonical representationThe canonical representation for short is defined by prohibiting certain options from the [Lexical representation]. Specifically, the the optional "+" sign is prohibited and leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesbyte[top]bytebyte is derived from [short] by setting the value of maxInclusive to be 127 and minInclusive to be -128. The base type of byte is . Lexical representation[top]Lexical representationbyte has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed. For example: -1, 0, 126, +100. Canonical representation[top]Canonical representationThe canonical representation for byte is defined by prohibiting certain options from the [Lexical representation]. Specifically, the the optional "+" sign is prohibited and leading zeroes are prohibited. Constraining facets[top]Constraining facetsnonNegativeInteger[top]nonNegativeIntegernonNegativeInteger is derived from [integer] by setting the value of minInclusive to be 0. This results in the standard mathematical concept of the non-negative integers. The value space of nonNegativeInteger is the infinite set {0,1,2,...}. The base type of nonNegativeInteger is . Lexical representation[top]Lexical representationnonNegativeInteger has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, "+" is assumed. For example: 1, 0, 12678967543233, +100000. Canonical representation[top]Canonical representationThe canonical representation for nonNegativeInteger is defined by prohibiting certain options from the [Lexical representation]. Specifically, the the optional "+" sign is prohibited and leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesunsignedLong[top]unsignedLongunsignedLong is derived from [nonNegativeInteger] by setting the value of maxInclusive to be 18446744073709551615. The base type of unsignedLong is . Lexical representation[top]Lexical representationunsignedLong has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 12678967543233, 100000. Canonical representation[top]Canonical representationThe canonical representation for unsignedLong is defined by prohibiting certain options from the [Lexical representation]. Specifically, leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesunsignedInt[top]unsignedIntunsignedInt is derived from [unsignedLong] by setting the value of maxInclusive to be 4294967295. The base type of unsignedInt is . Lexical representation[top]Lexical representationunsignedInt has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 1267896754, 100000. Canonical representation[top]Canonical representationThe canonical representation for unsignedInt is defined by prohibiting certain options from the [Lexical representation]. Specifically, leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesunsignedShort[top]unsignedShortunsignedShort is derived from [unsignedInt] by setting the value of maxInclusive to be 65535. The base type of unsignedShort is . Lexical representation[top]Lexical representationunsignedShort has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 12678, 10000. Canonical representation[top]Canonical representationThe canonical representation for unsignedShort is defined by prohibiting certain options from the [Lexical representation]. Specifically, the leading zeroes are prohibited. Constraining facets[top]Constraining facetsDerived datatypes[top]Derived datatypesunsignedByte[top]unsignedByteunsignedByte is derived from [unsignedShort] by setting the value of maxInclusive to be 255. The base type of unsignedByte is . Lexical representation[top]Lexical representationunsignedByte has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 126, 100. Canonical representation[top]Canonical representationThe canonical representation for unsignedByte is defined by prohibiting certain options from the [Lexical representation]. Specifically, leading zeroes are prohibited. Constraining facets[top]Constraining facetspositiveInteger[top]positiveIntegerpositiveInteger is derived from [nonNegativeInteger] by setting the value of minInclusive to be 1. This results in the standard mathematical concept of the positive integer numbers. The value space of positiveInteger is the infinite set {1,2,...}. The base type of positiveInteger is . Lexical representation[top]Lexical representationpositiveInteger has a lexical representation consisting of an optional positive sign ("+") followed by a finite-length sequence of decimal digits (#x30-#x39). For example: 1, 12678967543233, +100000. Canonical representation[top]Canonical representationThe canonical representation for positiveInteger is defined by prohibiting certain options from the [Lexical representation]. Specifically, the optional "+" sign is prohibited and leading zeroes are prohibited. Constraining facets[top]Constraining facets |