This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6250 - Doctype Override to HTML 3.2 or 2.0 fails
Summary: Doctype Override to HTML 3.2 or 2.0 fails
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.8.4
Hardware: PC All
: P2 normal
Target Milestone: 0.8.5
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
: 6448 6526 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-27 15:45 UTC by Olivier Thereaux
Modified: 2009-02-03 23:59 UTC (History)
3 users (show)

See Also:


Attachments

Description Olivier Thereaux 2008-11-27 15:45:19 UTC
Ville is tracking a bug in v0.8.4 of the validator whereby doctype override to any document type without System Identifier (HTML 2 and 3.2) fails with the following symptoms:

1) Warning (about undefined value being used IIRC) in server error log,
2) Incorrect doctype declaration inserted ("<!DOCTYPE html>") (show source),
3) Validator goes to HTML5 (!) mode and uses the HTML5 checker.

This patch:
http://www.w3.org/mid/E1L3mUf-0002d8-RA@lionel-hutz.w3.org
seems to get rid of the symptoms, but there may be some underlying bug with doctype override and the changes made to doctype detection when we added HTML5 support.

Worth an in-depth look at some point, before we can consider the case closed.
Comment 1 Ville Skyttä 2009-01-03 21:28:30 UTC
I think these changes are sufficient to consider the case closed:

http://www.w3.org/mid/E1LJDde-0002hk-Kh%40lionel-hutz.w3.org
http://www.w3.org/mid/E1LJDeq-0002kq-M1%40lionel-hutz.w3.org

The first is a generic fix for doctype override construction (works if either or both or neither of pubid/sysid are not available), and the second removes a bogus public id for HTML5 (types are keyed by public id so _something_ must be there for all types, and empty string seems to me the most logical choice for HTML5).

Actually I do not know how the HTML5 override could have worked properly without the latter patch (it inserted "<!DOCTYPE html PUBLIC "HTML5"> for me which to me seems exactly what was coded), but it did on validator.w3.org (inserted "<!DOCTYPE html>").  Maybe v.w.o wasn't using the types.conf that was in CVS but a version similarly altered as the 2nd patch above?
Comment 2 Ville Skyttä 2009-01-04 12:44:39 UTC
Spoke too soon it seems.  There are now/still issues with doctypeless documents:

http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fqa-dev.w3.org%2Fwmvs%2FHEAD%2Fdev%2Ftests%2Fxhtml1-missing-doctype-and-xmlns.html&charset=(detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.623

- Detected doctype: HTML5
- Warning displayed:
  "No DOCTYPE found! Checking with default HTML 4.01 Transitional Document Type."
- Errors out: "no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"."
- The HTML5 interface is apparently not invoked

This is otherwise the correct behavior as far as I can tell, but the doctype should not be detected to be HTML5.
Comment 3 Ville Skyttä 2009-01-08 07:16:36 UTC
Should be fixed (again) in CVS.
Comment 4 Ville Skyttä 2009-01-19 20:09:35 UTC
*** Bug 6448 has been marked as a duplicate of this bug. ***
Comment 5 Griff Ruby 2009-01-19 20:30:54 UTC
(In reply to comment #4)
> *** Bug 6448 has been marked as a duplicate of this bug. ***
Additional note:  This flaw also applies to ISO/IEC 15445:2000 ("ISO HTML") as well as HTML 2.0 and 3.2 (I checked them all; these are the only three document override settings this occurs for).
As I see the bug still operative using v0.8.4, and a Target Milestone of 0.8.5 I assume that means that the fix should be operational when 0.8.5 becomes the current version of the validator?
Comment 6 Ville Skyttä 2009-01-19 21:05:40 UTC
Yes, and ISO-HTML is taken care of as well.  You can use http://qa-dev.w3.org/wmvs/HEAD/ to test/verify the fix, but be aware that although efforts are made to keep it stable and running, it is a bleeding edge development instance which means it can have other issues not present in released versions.
Comment 7 Olivier Thereaux 2009-02-03 23:59:27 UTC
*** Bug 6526 has been marked as a duplicate of this bug. ***