Re: Tidy seems to duplicate </BODY> instead of removing it

Tidy does seem to have some trouble with the troublesome example.
Generally the structure should be something like:

<html>
<head>
...
</head>

<frameset>
  ...
  <noframes>
    ...
  </noframes>
</frameset>

</html>

So the original html erred by having a body. It also had the body outside the
frameset. The correction of the html should be to replace the body tags with
noframe tags and also to bring the enclosed section to within the frameset
section. This might be hard for tidy to do. Easier would be to just replace the
body tags (start and end) with noframes tags. Leaving it outside the frameset. If
being a stickler for form, it could remove the body all together.

Correcting HTML seems a pretty hard problem. Tidy makes a valiant effort and gives
us a good start on the job in many instances. Doing everything might be more than
can be hoped for. Try making a long outline in MSWord, save it as HTML, and then
try to clean  t h a t  up.

Jelks Cabaniss wrote:

> Francisco Guardiola wrote:
>
> > It seems there is an error in tidy ...
>
> > <frameset cols=170,*>
> > <frame name=menu src=menu.htm scrolling=no marginheight=0 marginwidth=0>
> > <frame name=data src=data.htm >
> > </frameset>
> > <BODY bgcolor="#ffffff">FRAMESET is used.</BODY>
>
> > line 9 column 1 - Warning: discarding unexpected <BODY>
> > line 13 column 1 - Warning: missing </NOFRAMES>
>
> There is no error here in Tidy -- the error is in your HTML.  Get rid of the
> BODY section.  (It might be wise to put a NOFRAMES section too -- where you now
> have BODY -- so browsers that don't understand frames have something to look
> at).
>
> >From http://www.w3.org/TR/REC-html40/frameset.dtd :
>
>     This is the HTML 4.0 Frameset DTD, which should be
>     used for documents with frames. This DTD is identical
>     to the HTML 4.0 Transitional DTD except for the
>     content model of the "HTML" element: in frameset
>     documents, the "FRAMESET" element replaces the "BODY"
>     element.
>
> /Jelks

--
Eric

Received on Thursday, 15 April 1999 14:21:10 UTC