declare name-letters
Syntax
declare name-letters string string
Purpose
A declaration used to identify an uppercase/lowercase relationship of characters above ASCII 127. OmniMark names are case-insensitive, however by default, only the characters of the Roman alphabet have defined upper and lowercase equivalents. You can define, for example, a relationship between upper- and lower-case accented characters, using a name-letters
declaration.
A name-letters
declaration must appear in the program before any rules.
There are several constraints on this declaration:
- The two strings that are the arguments of the
name-letters
declaration must be of the same length
- The strings must be string literals: dynamic strings are not allowed
- The characters in the first string must be between "%128#" and "%255#".
- Characters can't be duplicated in the first string.
- Characters in the second string must be valid name characters: uppercase English letters, digits, ".","-","_" or "%128#" to" %255#".
- No characters in the second string may have an English lowercase equivalent in the first string.
This means that:
- Every name character must be either lowercase or uppercase, but never both. A name character is lowercase if it is an English lowercase letter or if it appears in the first string in the
declare name-letters
declaration. A name character is uppercase if it is not lowercase.
- Every lowercase name character has a unique corresponding uppercase name character that is a different character than its lowercase version.
- Every uppercase English letter, digit, ".", "-", "_", the characters from the range "%128#" to "%225#" in the second argument, and the characters from the range "%128#" to "%225#" in neither the first or second argument, are all uppercase letters.
In the final analysis, an uppercase name character has zero, one, or more than one lowercase name character.
- There is no requirement to have a corresponding lowercase name character. This is typically for non-alphabetic characters: the digits and ".", "-", "_". Though, if these are specified, there may be lowercase values for these characters.
- An uppercase name character can have a single corresponding lowercase equivalent. This is typically the case in English letters, though again, it may be explicitly altered.
- An uppercase name character may have more than one lowercase equivalent. This typically occurs in languages with more forms of a lowercase version, usually by means of accents than by the uppercase name character.. French and Spanish are good examples of this.
This example defines the upper/lowercase relationship between all of the "accented" letters in the Latin 1 character set:
declare name-letters
"%10r{192,193,194,195,196,197,198,199,200,201}" _
"%10r{202,203,204,205,206,207,208,209,210,211}" _
"%10r{212,213,214,216,217,218,219,220,221,222}"
"%10r{224,225,226,227,228,229,230,231,232,233}" _
"%10r{234,235,236,237,238,239,240,241,242,243}" _
"%10r{244,245,246,248,249,250,251,252,253,254}"