Re: HTML and SGML declaration

Terry Allen (terry@ora.com)
Tue, 21 Nov 1995 11:28:58 PST


Dan:
| In message <199511211516.HAA03113@rock.west.ora.com>, Terry Allen writes:
| >Dan and I gave different answers to the question of whether an
| >HTML document may have a prepended SGML declaration. Dan pointed to
| >the following passage in RFC 1866:
| >| 3.3. HTML Public Text Identifiers
| >| To identify information as an HTML document conforming to this
| >| specification, each document must start with one of the following
| >| document type declarations.
| >| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
| >
| >and I had in mind ISO 8879 4.283:
| >"SGML document entity: The SGML entity that begins an SGML document
| >[as distinguished from SUBDOCs and text entities]. It contains,
| >at a minimum, an SGML declaration, a base document type declaration,
| >and the start and end (if not all) of a base document element."

| See also: 6.2.3 "Implied SGML Declaration"
| ... the system can imply the SGML declaration ...

But 6.2.3 doesn't say that an application convention can be established
that the system *must* imply the SGML declaration.

| >It is not possible to override 4.283 in the HTML spec;
|
| It is possible, and we did it. It's called an application convention.
| Just like null end-tags and all that. I don't understand your point.

I disagree with your assertion of application conventions wrt null
end-tags, too. But the point is just what I wrote: "what 3.3 describes
as an "HTML document" is not an SGML document entity but rather that
portion of it which is to be served to a client." And I note that
6.2.3 says in part:

The [SGML] declaration must be present explicitly, however, if the
document is subsequently sent to another system.

One might well want to process an "HTML document" as an SGML document
entity in the course of preparing it. It would not be an error to
prepend an SGML declaration to it at that point.

Regards,

-- 
Terry Allen  (terry@songline.com), Online Books Editor, Songline Studios
               affiliated with O'Reilly & Associates, Inc.   
A Davenport Group sponsor.  See http://www.ora.com/davenport/README.html
 "Laid across a map of the US, Indonesia would stretch from coast to coast."