- From: Peter Vince <peter_vince@yahoo.co.uk>
- Date: Wed, 3 Jan 2001 00:10:46 +0000 (GMT)
- To: HTML Tidy List <html-tidy@w3.org>
- Cc: "J. David Bryan" <dbryan@bcpl.net>
Hi Dave, 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. I think that each new version of HTML is basically a super-set of previous versions, and your simple table doesn't require the latest "hot off the press" version of HTML for it to be to be decodable. As such, a 3.2 Doctype would be correct. I think all old browsers will still attempt to display a file, whatever its Doctype, but it wouldn't be unreasonable for them to give up on the grounds that it is a type of document it doesn't understand. Therefore, the correct Doctype declaration to use is the minimum that is actually required. Regards, Peter ============================================================================= --- "J. David Bryan" <dbryan@bcpl.net> wrote: > Hello TidyFolks, > > The following HTML code: > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> > <html> > <head> > <title>X</title> > </head> > <body> > <table> > <tr> > <td>Some text.</td> > </tr> > </table> > </body> > </html> > > ...validates as strict HTML 4.01, according to the W3C validator. However, > Tidy 4-Aug-00 complains: > > line 17 column 1 - Warning: html doctype doesn't match content > t.html: Doctype given is "-//W3C//DTD HTML 4.01//EN" > t.html: Document content looks like HTML 3.2 > > ...and will tidy the resulting output by replacing the doctype with one for > HTML 3.2. In order to convince Tidy that this is valid HTML 4.01 Strict, > one must place "Some text" in a paragraph element: > > <td><p>Some text.</p></td> > > This apparently is required by code in the "ParseBlock" routine of > "parser.c", specifically lines 661-666: > > /* > HTML4 strict doesn't allow mixed content for > elements with %block; as their content model > */ > lexer->versions &= ~VERS_HTML40_STRICT; > continue; > > Is Tidy wrong here, or is the W3C validator? It appears to me that Tidy is > in error, as the TD element is not %block but rather %flow: > > <!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell--> > > where %flow is: > > <!ENTITY % flow "%block; | %inline;"> > > So the inline content should be acceptable in HTML 4.01 strict. > > -- Dave ============================================================================= ===== Work: Peter_Vince@yahoo.co.uk Home: Barney.Wol@noctua.demon.co.uk Web: http://www.noctua.demon.co.uk/ PGP id = 0x332B72C0 PGP fp: 3535 9AD9 C0EA 3606 0DE4 3811 422E 10B4 332B 72C0 ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
Received on Tuesday, 2 January 2001 18:50:45 UTC