Re: [BUG?] TD inline content not accepted with strict doctype

On 3 Jan 2001, at 0:10, Peter Vince wrote:

> I think that what Tidy is reporting is not that it is invalid, but just
> that you only need an HTML 3.2 interpreter to be able to correctly decode
> this file. 

First, I'm afraid that I've muddied the waters a bit here.  The warning I 
cited ("html doctype doesn't match content") and the replacement by the 
HTML 3.2 doctype doesn't occur in the distributed Tidy 4-Aug-00 version.   
It occurs in a version that I patched to fix a bug with doctype reporting 
(see an associated message of mine for details).  I apologize for not 
testing my assertion with the released version.

Here's a better example that does work improperly with the released 
version:

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
  <html>
  <head>
  <title>X</title>
  </head>
  <body>
  <table>
  <tr>
  <td>Some <abbr>FUD</abbr>text.</td>
  </tr>
  </table>
  </body>
  </html>

This is valid HTML 4.01 Strict, as confirmed by the W3C validator.  
However, Tidy 4-Aug-00 reports:

  t.html: Doctype given is "-//W3C//DTD HTML 4.01//EN"
  t.html: Document content looks like HTML 4.01 Transitional

If, however, I replace the table data cell line with:

  <td><p>Some <abbr>FUD</abbr>text.</p></td>

...then I get:

  t.html: Doctype given is "-//W3C//DTD HTML 4.01//EN"
  t.html: Document content looks like HTML 4.01

This illustrates that Tidy thinks that TD elements cannot contain inline 
content in HTML 4.01 Strict, but as far as I can tell, the standard says it 
can.  So I believe that Tidy has a bug here, unless I've misinterpreted the 
DTD.


> Therefore, the correct Doctype declaration to use is the minimum that is
> actually required. 

I believe that is contraindicated by this statement in the "Status of this 
Document" section of the HTML 4.01 Specification:

  "W3C recommends that authors produce HTML 4 documents instead of HTML
   3.2 documents." 

(Producing an "HTML 4 document" requires using an HTML 4 doctype.)

                                      -- Dave

Received on Thursday, 4 January 2001 15:07:16 UTC