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 9970 - The XML declaration is suggested for polyglot documents
Summary: The XML declaration is suggested for polyglot documents
Status: RESOLVED DUPLICATE of bug 9963
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML/XHTML Compat. Authoring Guide (ed: Eliot Graff) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Eliot Graff
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/html-xhtml-au...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-21 08:00 UTC by Henri Sivonen
Modified: 2010-10-05 13:07 UTC (History)
4 users (show)

See Also:


Attachments

Description Henri Sivonen 2010-06-21 08:00:05 UTC
Polyglot Markup: HTML-Compatible XHTML Documents (18 June 2010) says:
"Use both the XML Declaration and meta tag to specify the appropriate character encoding."

This is wrong. The syntax of an XML Declaration is a parse error (and parses as a bogus comment) in text/html. Therefore, document that has an XML declaration cannot be a polyglot document.

Please remove the suggestion to use an XML declaration and instead explicitly state that polyglot documents can't have an XML declaration.

Note that in the absence of a BOM, an XML declaration or transport-layer encoding declaration, XML defaults to UTF-8 anyway.
Comment 1 Henri Sivonen 2010-06-21 08:11:46 UTC

*** This bug has been marked as a duplicate of bug 9963 ***