Re: Body start tag.

E. Stephen Mack wrote:
> It comes as a shock to me.  Why then does global.html say:
> 
> > <!ELEMENT BODY O O  (%block) -(BODY) +(INS|DEL)>
> > Start tag: optional, End tag: optional
>   ^^^^^^^^^^^^^^^^^^^
> Here the start tag is declared to be optional.

It is either:

	a) just a mistake.
	b) non-intuitive but correct: If there *were* a case where <BODY> was
*required* then it would be optional

> The HTML element must contain a HEAD element, plus either
> a FRAMESET elment or a BODY element.  However, the FRAMESET's
> start tag is required.  Shouldn't the presence of PCDATA
> imply the BODY element's beginning?  If there's no explicit
> <FRAMESET> and no explicit <BODY>, PCDATA should imply the
> presence of the optional <BODY> start tag.

SGML parsers are not required to do a depth-first search of the DTD.
SGML simply has a few simple rules for allowing tags to be left off. One
of them is that if an element is *contextually required* and is declared
to have omissable start tags, then the tags can be left off.

> Am I wrong?  Is the KGV in error here, or does the HTML 4.0 DTD
> really now *require* that the <BODY> tag be present?

The latter. FRAMESET is badly designed.

 Paul Prescod

Received on Wednesday, 16 July 1997 08:53:39 UTC