W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 1999

Recovering from extra framesets

From: Randy Waki <rwaki@sun10.whizbanglabs.com>
Date: Thu, 16 Sep 1999 12:55:29 -0600
To: "HTML Tidy Mailing List" <html-tidy@w3.org>
Message-ID: <000001bf0075$0bb15d50$ce9946a6@whizbanglabs.com>
IE and Netscape seem to ignore extra framesets while 26-Jul-99 Tidy treats
them as errors.

I hope it's not rash to assume that in cases like this, we want Tidy to
approximate what most users are likely to experience in their browsers.

-------- Example input document --------

<frameset cols="50%,50%">
  <frame src="a.html">
  <frame src="b.html">

  <frame src="ignored-by-browsers.html">


The following changes should cause Tidy to discard extra framesets.  Note
the potential problem described in the comments.  The changes are untested
in C but they were translated from Java where they WERE tested.

1. In parser.c, change:

      /* flag an error if we see more than one frameset */


      /* parse framesets but only keep the first one */
      /* PROBLEM: Discarded framesets might still affect the */
      /*          global document state when they are parsed */

2. Also in parser.c, change:

      if (frameset != null)
          ReportError(lexer, html, node, DUPLICATE_FRAMESET);
          frameset = node;


      if (frameset != null)
          ReportWarning(lexer, html, node, DUPLICATE_FRAMESET);
          ParseTag(lexer, node, mode);
      frameset = node;

3. In localize.c, change DUPLICATE_FRAMESET from an error to a warning (be
sure to change the string literal itself, too).

Received on Thursday, 16 September 1999 14:56:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:46 UTC