RFC 1866 Hypertext Markup Language - 2.0 November 1995
The start symbol of the DTD grammar is HTML, and the productions are
given in the public text identified by `-//IETF//DTD HTML 2.0//EN'
(9.1, "HTML DTD"). The terminals above parse as:
HTML
|
\-HEAD
| |
| \-TITLE
| |
| \-
| |
| \-"Parsing Example"
| |
| \-
|
\-BODY
|
\-P
|
\-
|
\-"Some text. "
|
\-EM
| |
| \-
| |
| \-"*wow*"
| |
| \-
|
\-
Some of the elements are delimited explicitly by tags, while the
boundaries of others are inferred. The element contains a
element and a element. The contains ,
which is explicitly delimited by start- and end-tags.
3.2. HTML Lexical Syntax
SGML specifies an abstract syntax and a reference concrete syntax.
Aside from certain quantities and capacities (e.g. the limit on the
length of a name), all HTML documents use the reference concrete
syntax. In particular, all markup characters are in the repertoire of
[ISO-646]. Data characters are drawn from the document character set
(see 6, "Characters, Words, and Paragraphs").
RFC 1866 Hypertext Markup Language - 2.0 November 1995
A complete discussion of SGML parsing, e.g. the mapping of a sequence
of characters to a sequence of tags and data, is left to the SGML
standard[SGML]. This section is only a summary.
3.2.1. Data Characters
Any sequence of characters that do not constitute markup (see 9.6
"Delimiter Recognition" of [SGML]) are mapped directly to strings of
data characters. Some markup also maps to data character strings.
Numeric character references map to single-character strings, via the
document character set. Each reference to one of the general entities
defined in the HTML DTD maps to a single-character string.
For example,
abc<def => "abc","<","def"
abc<def => "abc","<","def"
The terminating semicolon on entity or numeric character references
is only necessary when the character following the reference would
otherwise be recognized as part of the name (see 9.4.5 "Reference
End" in [SGML]).
=7= |