Apache OpenOffice (AOO) Bugzilla – Issue 19666
HTML import/export: should be HTML (4.01 or later) compliant
Last modified: 2019-02-04 01:13:32 UTC
In a newly created HTML document, the DOCTYPE is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> The HTML 4.0 specification (and the 4.01 specification, which should be used instead, but that's a different issue) clearly states the DOCTYPE should be like this for HTML 4.0 Transitional: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> (For 4.01 Transitional, like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> ) (NB: Mozilla, in particular, requires a properly formed DOCTYPE of 4.01 or later to recognize the HTML as "standards compliant" and render it as such.)
reassigned to es
Confirmed OOo 1.1.0
ES->MIB: I don't think the reference to the DTD is mandatory.
Please read section 7.2 of the HTML 4.01 Recommendation. It is available here: http://www.w3.org/TR/html4/ . In part, it states: "A valid HTML document declares what version of HTML is used in the document. The document type declaration names the document type definition (DTD) in use for the document (see [ISO8879] [p.353] )." In addition, keep in mind that some browsers (those that use a Gecko base, for example) determine how to render the HTML based upon the DOCTYPE declared. A missing DOCTYPE results in the HTML being rendered in a mode that comforms to the pattern used by Netscape Communicator 4.x.
http://www.w3.org/QA/2002/04/valid-dtd-list.html I had intended to include this link.
I agree that it is not the best solution that the doctype claims to be HTML4, but the document content uses extension to HTML4. However, these extensions are required for round trip of features HTML hasn't, like fields. It might be an option to define a new DTD for these extensions, but I'm not sure whether all browsers would recognize the document to be HTML then. So in the short term, there is no solution to this issue.
My request was that OpenOffice produce a VALID DOCTYPE when outputting HTML. That seems pretty straight forward to me. What extensions?
You question is correct. The doctype declaration itself seems to be incorrect. Please take my apologies for the wrong interpretation of your issue.
These additional resources may be useful: W3C "Tip" about using a valid DTD: http://www.w3.org/QA/Tips/Doctype Zeldman @ A List Apart: "Fix Your Site With the Right DOCTYPE!": http://www.alistapart.com/articles/doctype/
*** Issue 6443 has been marked as a duplicate of this issue. ***
*** Issue 4976 has been marked as a duplicate of this issue. ***
*** Issue 127633 has been marked as a duplicate of this issue. ***
*** Issue 39748 has been marked as a duplicate of this issue. ***
Changing title to a more generic feedback. I chose this Issue over other due to the links.
Fine, as long as it gets fixed.