Re: IETF HTML V. 2.0 Question

Scott Fendley <dsf@postbox.uark.edu> writes:
>I am a student in a WWW Computing class this semester and we just had a
>midterm with what I believe is an impossible question.  Would someone please
>tell me if the answer is actually in the rfc1866 (HTML Version 2.0) spec?
>Or is my professor loosing his mind?

Before I go on, yes, your professor may be losing his mind, but this may
have nothing to do with the midterm.

>Here is the Question. What is the method which is formally sanctioned in
>IETF HTML version 2.0 for representing the following DOCTYPE expression as
>readable plain text? - that is, without processing it.
>
><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML level 3.2//EN">

Scott,

This brings up two topics: (1) how to represent SGML/HTML markup in HTML
document content, and (2) which IETF FPIs (Formal Public Identifiers) for
HTML are valid or "formally-sanctioned".

---- question 1 ----
The way the question is phrased is somewhat confusing. I would hesitate to
use the description "plain text", since a "plaintext" document ('.TXT'
extension in DOS, MIME type 'text/plain') is not an HTML document, so you
could include all the HTML markup you want and none would be processed.

But assuming you're trying to include a readable DOCTYPE declaration in
HTML document content, while I couldn't find this _explicitly_ explained in
RFC 1866, this is done by 'escaping' any special characters as described in
Section 9.7.1. A general knowledge of how markup works is somewhat assumed
given that this is an RFC for an SGML application, not a tutorial.

Scott writes:
>My best guesses are that since the <XMP>...</XMP> were removed with version
>2.0 then you would either use the <pre>...</pre> tags  or you would use the
>&lt;&gt; symbols to print them to screen.

Correct. If you're simply trying to get the font changed to monospaced, you
could use CODE for inline, or PRE for breaking. Neither allow straight
CDATA (as did XMP and LISTING), so it's still necessary to 'escape' any
markup characters, but converting any quotes and angle brackets to &quot;,
&gt; and &lt; is pretty straightforward:

    &lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;&gt;

Figure 3 on page 360 of Goldfarb's "The SGML Handbook" describes the SGML
markup characters. Those that are processed in a document instance need to
be 'escaped'. In HTML these include STAGO ('<'), TAGC ('>'), LIT ('"') and
ERO ('&').

---- question 2 ----
The IETF has not "sanctioned" any post-2.0 versions of HTML as of yet, so
use of any FPI referring to HTML 3.0, 3.2, etc. (including the drafts of
HTML '2.1', '2.1E', '3.0') is invalid. The "//IETF//" part of the FPI is
the owner ID, so if you wish to use a DOCTYPE referring to the W3C's HTML
3.2 DTD, make sure the owner ID is "W3C", as in

   "-//W3C//DTD HTML 3.2//EN"

Note that W3C is not a standards body, and version 3.2 is only a working
draft, subject to change at any time.

The available FPIs for IETF versions of HTML are listed in IETF RFC 1866 under:

        -- catalog: SGML Open style entity catalog for HTML --
        -- $Id: catalog,v 1.3 1995/09/21 23:30:23 connolly Exp $ --

        -- Ways to refer to Level 2: most general to most specific --
    PUBLIC  "-//IETF//DTD HTML//EN"                 html.dtd
    PUBLIC  "-//IETF//DTD HTML 2.0//EN"             html.dtd
    [etc. ...]

You would use the FPI appropriate to the document. Creating an FPI out of
the blue and using IETF or W3C as ownerID is akin to writing a book and
putting someone else's name on it: false attribution. Better to make up
your own. For example, our inhouse DTD is referred to by

   "-//Spyglass//DTD HTML 2.0 Extended//EN"
       ^^^^^^^^
Murray

```````````````````````````````````````````````````````````````````````````````
     Murray Altheim, Program Manager
     Spyglass, Inc., Cambridge, Massachusetts
     email: <mailto:murray@spyglass.com>
     http:  <http://www.stonehand.com/murray/murray.html>

Received on Thursday, 6 June 1996 16:40:50 UTC