Copyright © 1992, 1997 International Organization for Standardization. All rights reserved. This electronic document is for use during development and review of International Standards. Official printed copies of International Standards can be purchased from the ISO and the national standards organization of your country. | ||||
Next Clause | Previous Clause |
A.2 Lexical Type Definition Requirements (LTDR)
Lexical types are declared within "lexical type sets", along with "lexicographic orderings" (see A.2.1.2 Lexicographic ordering) and "lexical constraints" (see A.2.1.3 Additional lexical constraints). Lexical type declaration sets may also contain notation, data attribute definition list, and parameter entity declarations, each as defined in ISO 8879. Each declaration is preceded and followed by zero or more parameter separators, also as defined in ISO 8879.
Within a document, a lexical type use declaration identifies one or more lexical type declaration sets, whose lexical types are to be made available for use in the document. A lexical type use declaration for a lexical type set must precede uses of the lexical types declared within that set. There can be more than one lexical type use declaration in a DTD or LPD.
Syntactically, a lexical type use declaration is a processing instruction (PI), not an SGML markup declaration. Its syntax is (using the production syntax defined in ISO 8879):
lexical type use declaration = | ||
pio, "IS10744", s+, "LEXUSE", (ps+, lexical type set entity name )+ ps*, pic |
lexical type set entity name = | ||
name |
Because lexical type set entities are never referenced within a DTD or LPD, they must be self-contained; notations, data attributes, parameter entities, lexicographic orderings, lexical constraints, and lexical types referenced within them must also be declared within them.
NOTE 382 A lexical type set may use parameter entity references to "import" declarations from other lexical type sets.
Lexical types are defined by "lexical type declarations". A lexical type declaration takes the form of an SGML markup declaration with the following syntax:
lexical type declaration = | ||
mdo, "LEXTYPE", ps+, lexical type name, ( ps+, lexicographic ordering specification )?, ( ps+, additional lexical constraint specification )*, ps+, lexical model specification, ps*, mdc |
lexical type name = | ||
name |
lexicographic ordering specification = | ||
rni, "ORDER", lexicographic ordering name |
additional lexical constraint specification = | ||
rni, "CHECK", lexical constraint name |
lexical model specification = | ||
lexical model | ( "SPEC", ps+, external identifier ) |
means that the external identifier identifies a lexical type definition, presumably written in a natural language.
lexical model = | ||
( parameter literal | external identifier ), ps+, notation name, data attribute specification? |
Characters in a computer system are inherently ordered by their coded representations, which assign them positions in a character set.
NOTE 383 The base-10 integer representation of a coded representation is called a "character number". In an SGML document, characters can be represented by their coded representations (bit combinations) in the usual way, and also by means of a string containing a delimited character number, called a "numeric character reference".
When characters are compared, as when sorting, testing conformance to a lexical type, or testing equality in a query, the character set order may not be suitable. A "lexicographic ordering" specifies an alternate set of character positions to be assigned for such comparisons.
NOTE 384 The alternative positions are sometimes called a "sort order", although their use is not restricted to sorting. The lexicographic ordering definition is sometimes called a "sort translation", although in fact no permanent character number translation occurs: the reordering is normally transitory and internal to the processing program.
Lexicographic orderings are identified by "lexicographic ordering declarations". A lexicographic ordering declaration takes the form of an SGML markup declaration with the following syntax:
lexicographic ordering declaration = | ||
mdo, "LEXORD", ps+, lexicographic ordering name, ps+, lexicographic ordering definition, ps*, mdc |
lexicographic ordering name = | ||
name |
lexicographic ordering definition = | ||
lexicographic ordering expression | ( "SPEC", ps+, external identifier ) |
means that the external identifier identifies a lexicographic ordering definition, presumably written in a natural language.
lexicographic ordering expression = | ||
( parameter literal | external identifier ), ps+, notation name, data attribute specification? |
Additional lexical constraints are identified by "lexical constraint declarations". A lexical constraint declaration takes the form of an SGML markup declaration with the following syntax:
lexical constraint declaration = | ||
mdo, "LEXCON", ps+, lexical constraint name, ps+, lexical constraint definition, ps*, mdc |
lexical constraint name = | ||
name |
lexical constraint definition = | ||
lexical constraint expression | ( "SPEC", ps+, external identifier ) |
means that the external identifier identifies a lexical constraint definition, presumably written in a natural language.
lexical constraint expression = | ||
( parameter literal | external identifier ), ps+, notation name, data attribute specification? |
Next Clause | Previous Clause |
HTML generated from the original SGML source using a DSSSL style specification and the SGML output back-end of the JADE DSSSL engine.