CONTENTS
[ Back ] [ Next ]
Click Here to visit the home page belonging to
the creator of DCP and get access to other downloads, including a
white paper on forward compatible
design for the Internet.
| |
CONVENTIONS
All mechanisms in this reference are specified in both prose and an augmented Bakus-Naur
Form (BNF) similar to that used by Internet RFC 822. Implementers of DCP will need
to be familiar with the BNF notation in order to understand this reference. For
convenience, this resource includes an overview of BNF that is sufficient for
comprehending the DCP specification.
|
|
|
The augmented BNF includes the following constructs:
name = definition : The name of a rule is simply the name itself (without any enclosing "<"
and ">") and is separated from its definition by the equal character
"=". White space is only significant in that indentation of continuation lines is
used to indicate a rule definition that spans more than one line. Certain basic rules are
in a special style, such as sp,
lws, ht, crlf,
etc. Angle brackets are used within
definitions whenever their presence will facilitate discerning the use of rule names.
Note: Contrary to some RFCs, this specification does not represent
basic rules in all uppercase letters. Rather, a special style is
used as indicated above. |
| "literal" : Quotation marks surround literal text. Unless stated otherwise, the text is
case-insensitive. |
| rule1 | rule2 : Elements separated by a bar ("|") are alternatives, e.g., "yes |
no" will accept yes or no. |
| (rule1 rule2) : Elements enclosed in parentheses are treated as a single element. Thus, "(elem
(foo | bar) elem)" allows the token sequences "elem foo elem" and
"elem bar elem". |
| *rule : The character "*" preceding an element indicates repetition. The full form is
"<n>*<m>element" indicating at least <n> and at most <m>
occurrences of element. Default values are 0 and infinity so that "*(element)"
allows any number, including zero; "1*element" requires at least one; and
"1*2element" allows one or two. |
| [rule] : Square brackets enclose optional elements; "[foo bar]" is equivalent to
"*1(foo bar)". |
| n rule : Specific repetition: "<n>(element)" is equivalent to
"<n>*<n>(element)"; that is, exactly <n> occurrences of
(element). Thus 2digit is a 2-digit number, and 3alpha is a string of three alphabetic
characters. |
| #rule : A construct "#" is defined, similar to "*", for defining lists of
elements. The full form is "<n>#<m>element" indicating at least
<n> and at most <m> elements, each separated by one or more commas
(",") and optional linear white space (lws). This makes the usual form of lists
very easy; a rule such as "( *lws element *(
*lws "," *lws element ))"
can be shown as "1#element". Wherever this construct is used, null elements are
allowed, but do not contribute to the count of elements present. That is, "(element),
, (element)" is permitted, but counts as only two elements. Therefore, where at least
one element is required, at least one non-null element must be present. Default values are
0 and infinity so that "#(element)" allows any number, including zero;
"1#element" requires at least one; and "1#2element" allows one or two. |
; comment : A semi-colon below, above or set off some distance to the right of rule text, starts a comment that
continues to the end of line. This is a simple way of including useful notes in parallel
with the specifications.
Note: This reference also includes comments in the same style as this
paragraph preceded by "Note:" in this font-face and color rather
than using the ";" indicator. |
| implied *lws : The grammar described by this specification is word-based. Except where noted
otherwise, linear white space (lws) can be included between any two adjacent words
(token
or quotedString), and between adjacent tokens and delimiters (tSpecials), without
changing the interpretation of a field. At least one delimiter (tSpecials) must exist
between any two tokens, since they would otherwise be interpreted as a single token.
However, applications should attempt to follow "common form" when generating DCP
constructs.
|
|
|
|
The following rules are used throughout this specification to describe basic parsing
constructs. The US-ASCII coded character set is defined by ANSI X3.4-1986.
Syntax
| octet |
= |
<any 8-bit sequence of data> |
| char |
= |
<any US-ASCII character (octets 0 - 127)> |
| upAlpha |
= |
<any US-ASCII uppercase letter
"A".."Z"> |
| loAlpha |
= |
<any US-ASCII lowercase letter
"a".."z"> |
| alpha |
= |
upAplha
| loAlpha |
| digit |
= |
<any US-ASCII digit
"0".."9"> |
| ctl |
= |
<any US-ASCII control character (octets 0 -
31) and DEL (127)> |
| cr |
= |
<US-ASCII CR, carriage return (13)> |
| lf |
= |
<US-ASCII LF, linefeed (10)> |
| sp |
= |
<US-ASCII SP, space (32)> |
| ht |
= |
<US-ASCII HT, horizontal-tab (9)> |
| <"> |
= |
<US-ASCII double-quote mark (34)> |
| crlf |
= |
cr lf
Note: DCP defines the octet sequence cr lf
as the end-of-line marker for all protocol
elements except the entity body. The end-of-line marker within an
entity body is
defined by its associated media type.
|
| lws |
= |
[crlf] 1*( sp
| ht )
Note: DCP headers may be folded onto multiple lines if each continuation line begins with a
space or horizontal tab. All linear white space, including folding, has the same semantics
as sp. However, folding of header lines is not expected by some applications, and should not
be generated by DCP applications.
|
| text |
= |
<any octet except ctl, but including
lws>
Note: The text rule is only used for descriptive field contents and values that are not
intended to be interpreted by the message parser. Words of *text may contain
octets from
character sets other than US-ASCII. Recipients of header field text containing
octets outside the US-ASCII character set
may assume that they represent ISO-8859-1 characters.
|
| hex |
= |
"A" | "B" | "C" |
"D" | "E" | "F" | "a" | "b" |
"c" | "d" | "e" | "f" | digit |
| word |
= |
token | quotedString
Note: Many DCP header field values consist of words separated by
lws
or special
characters. These special characters must be in a quotedString to be used within a
parameter value.
|
| token |
= |
1*<any char except ctl
or tSpecials> |
| tSpecials |
= |
"(" | ")" | "<"
| ">" | "@" | "," | ";" | ":" |
"\" | <"> | "/" | "[" | "]" |
"?" | "=" | "{" | "}" | sp
| ht |
| comment |
= |
"(" *( cText | comment ) ")"
Note: Comments may be included in some DCP header fields by surrounding the comment text with
parentheses. Comments are only allowed in fields containing "comment" as part of
their field value definition. In all other fields, parentheses are considered part of the
field value.
|
| cText |
= |
<any text excluding "(" and
")"> |
| quotedString |
= |
( <"> *(qdText)
<"> )
Note: A string of text is parsed as a single word if it is quoted using double-quote marks.
|
| qdText |
= |
<any char except <"> and
ctl, but
including lws>
Note: Single-character quoting using the backslash ("\") character is not permitted
in DCP. |
|
|