Compartmented Mode Workstation Labeling: Encodings Format

Chapter 2 Structure and Syntax of Encodings File

An encodings file is a standard operating system file containing free text, and can be created and maintained by any desired editor or word processor, as long as no formatting codes are placed in the encodings file. Case is insignificant throughout the file, and blank lines are always ignored. There is a maximum length for lines in the file of 256 characters. The encodings are comprised mainly of a number of keywords, some of which require a value. Some keywords are required to be present, whereas some are optional. Keywords that require a value always end with an equal sign without a blank before it. The value is separated from the keyword by one or more blanks or tabs, and runs until the first semicolon or the end of the line, whichever comes first. Keywords or keyword/value pairs are separated by semicolons or the end of the line. Keywords themselves can contain blanks, but cannot be split over two lines. There is no maximum length of a keyword value per se, but the keyword and its value must fit on the same line. The following table shows examples of keywords and keyword/value pairs.

Encodings File Structure

The following table lists the keyword and value pairs in the encodings file.

Table 2–1 Keyword and Value Pairs

keyword1; keyword2 

The second keyword is ended by the end of the line 

keyword3= three; keyword4; 

The value of keyword3 is “three”; keyword4 is ended by the semicolon before the end of the line 

keyword5 = five 

This line does not contain a single keyword/value pair, because the = has a blank before it; this line represents a common error in attempting to specify the keyword “keyword5= “ 

Note that if the keyword/value pair sits alone on a line, no terminating semicolon is needed (but is always allowed).

Comments can be placed on any line in the encodings file. Comments can appear anywhere a keyword can start. Comments begin with a * and continue through the end of the line. It is not possible to begin a comment in the middle of a keyword or a value, nor is it possible to have any keywords following a comment on the same line. On lines that do not contain keywords (i.e., required combination, combination constraint, and user accreditation range sensitivity label lines), comments can appear only at the beginning of the line, or following white space on the line.

The encodings are comprised of a version specification and seven mandatory sections: classifications, information labels, sensitivity labels, clearances, channels, printer banners, and accreditation range which must appear in this order. Following these sections can be an optional name information labels section. A number of these sections in turn have subsections. The version specification is the single keyword VERSION=, followed by a character string that identifies this particular version of encodings. An example is:


VERSION= DISTRIBUTED DEMO VERSION

The sections mentioned above each begin with a keyword that ends with a colon, as follows:

   CLASSIFICATIONS:

   INFORMATION LABELS:

   SENSITIVITY LABELS:

     CLEARANCES:

     CHANNELS:

   PRINTER BANNERS:

   ACCREDITATION RANGE:

   NAME INFORMATION LABELS:

Each section ends when a keyword that starts the next section is found, or at the end of the file.

The INFORMATION LABELS:, SENSITIVITY LABELS:, CLEARANCES:, CHANNELS:, and PRINTER BANNERS: sections all contain a mandatory subsection started with the keyword WORDS:. Furthermore, the INFORMATION LABELS:, SENSITIVITY LABELS:, and CLEARANCES: sections also have two other mandatory subsections started with the keywords REQUIRED COMBINATIONS: and COMBINATION CONSTRAINTS:

Thus, a complete template for an encodings file is as follows.

VERSION=

CLASSIFICATIONS:

INFORMATION LABELS:

   WORDS:

   REQUIRED COMBINATIONS:

   COMBINATION CONSTRAINTS:

SENSITIVITY LABELS:

   WORDS:

   REQUIRED COMBINATIONS:

   COMBINATION CONSTRAINTS:

CLEARANCES:

   WORDS:
   REQUIRED COMBINATIONS:

   COMBINATION CONSTRAINTS:

CHANNELS:     

WORDS:

PRINTER BANNERS:
   WORDS:

ACCREDITATION RANGE:
NAME INFORMATION LABELS: