Table of contentsAppendices |
2.3 Lexical spaceLexical spaceIn addition to its value space, each datatype also has a lexical space. A lexical space is the set of valid literals for a datatype. For example, "100" and "1.0E2" are two different literals from the lexical space of [float] which both denote the same value. The type system defined in this specification provides a mechanism for schema designers to control the set of values and the corresponding set of acceptable literals of those values for a datatype. NOTE: Canonical Lexical Representation[top]Canonical Lexical RepresentationWhile the datatypes defined in this specification have, for the most part, a single lexical representation i.e. each value in the datatype's value space is denoted by a single literal in its lexical space, this is not always the case. The example in the previous section showed two literals for the datatype [float] which denote the same value. Similarly, there may be several literals for one of the date or time datatypes that denote the same value using different timezone indicators. A canonical lexical representation is a set of literals from among the valid set of literals for a datatype such that there is a one-to-one mapping between literals in the canonical lexical representation and values in the value space. |