Canonical Forms
Fundamental to the activity of transformation is the notion of a canonical form. For a given message standard, each field and structured field value may be thought of as an object with a particular semantics that is representable by one or more strings. That is, each of these strings has an identical semantics, as they all refer to the same object. For example, in terms of the 822 standard, the two strings
The Protocol Police <NetSer@UCI>
NetSer@UCI
are semantically equivalent. For the purposes of this memo, a fully-qualified canonical form of an object is thought of as the simplest string that represents the full and complete meaning of an object. The meaning of "simple" is, of course, open to interpretation. In some cases, "simplest" may mean "shortest". In other cases, a longer, but unabbreviated string may be "simpler" than a shorter string. Regardless of this, a canonical form is a representation of an object. This representation contains the smallest amount of information required to fully describe the meaning of the object.
It is not difficult to determine what a canonical form should describe for different objects. In terms of the 822 standard, the following should be considered as minimal definitions of canonical forms:
object specifies contains
------ --------- --------
field field-name name
address mailbox local-part
domain-part
date date-time date-part
time-part
In terms of USENET, the following might be considered as minimal definitions of canonical forms:
object specifies contains
------ --------- --------
field field-name name
address mailbox user
route
date date-time date-part
time-part
NOTE: This memo clearly has no authority to specify the minimal canonical forms for USENET. The above table is listed solely for the benefit of the examples which follow.
Conceptually, transformation of fields and structured field values occurs between canonical forms. That is, to transform an address, one reduces the string representing the object to its canonical form, to capture the essence of its meaning, and this form is then transformed, somehow, to the equivalent canonical form for the target standard. This target canonical form can later be output using a string representation.
NOTE: This memo does not require that canonical forms be represented or otherwise implemented as strings. Nor does this standard require that strings be used during the transformation process. Thinking of a canonical form as a string is a convenient formalism only, not an implementational requirement.