declare name-letters string string
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 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: