Skip to content

Commit 31c20af

Browse files
sideshowbarkerdomenic
authored andcommitted
Remove obsolete permitted DOCTYPEs
From now on conformance checkers can only allow <!doctype html> and <!doctype html SYSTEM "about:legacy-compat"> as doctypes in HTML syntax. The HTML4 and XHTML1 DOCTYPEs are no longer allowed. (XHTML syntax continues to be supported and is not influenced by this change.)
1 parent 37ea5ac commit 31c20af

File tree

1 file changed

+2
-102
lines changed

1 file changed

+2
-102
lines changed

source

+2-102
Original file line numberDiff line numberDiff line change
@@ -98484,7 +98484,7 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
9848498484
<li>A string that is an <span>ASCII case-insensitive</span> match for the string "<code data-x="">&lt;!DOCTYPE</code>".</li>
9848598485
<li>One or more <span data-x="space character">space characters</span>.</li>
9848698486
<li>A string that is an <span>ASCII case-insensitive</span> match for the string "<code data-x="">html</code>".</li>
98487-
<li>Optionally, a <span>DOCTYPE legacy string</span> or an <span>obsolete permitted DOCTYPE string</span> (defined below).</li>
98487+
<li>Optionally, a <span>DOCTYPE legacy string</span>.</li>
9848898488
<li>Zero or more <span data-x="space character">space characters</span>.</li>
9848998489
<li>A U+003E GREATER-THAN SIGN character (&gt;).</li>
9849098490
</ol>
@@ -98513,62 +98513,6 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
9851398513
<p>The <span>DOCTYPE legacy string</span> should not be used unless the document is generated from
9851498514
a system that cannot output the shorter string.</p>
9851598515

98516-
<hr>
98517-
98518-
<!-- see the parser section before changing this bit -->
98519-
98520-
<p>To help authors transition from HTML4 and XHTML1, an <dfn>obsolete permitted DOCTYPE
98521-
string</dfn> can be inserted into the DOCTYPE (in the position defined above). This string must
98522-
consist of:</p>
98523-
98524-
<ol class="brief">
98525-
<li>One or more <span data-x="space character">space characters</span>.</li>
98526-
<li>A string that is an <span>ASCII case-insensitive</span> match for the string "<code data-x="">PUBLIC</code>".</li>
98527-
<li>One or more <span data-x="space character">space characters</span>.</li>
98528-
<li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>first quote mark</i>).</li>
98529-
<li>The string from one of the cells in the first column of the table below. The row to which this cell belongs is the <i>selected row</i>.</li>
98530-
<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step labeled <i>first quote mark</i>).</li>
98531-
<li>If the cell in the second column of the <i>selected row</i> is not blank, one or more <span data-x="space character">space characters</span>.</li>
98532-
<li>If the cell in the second column of the <i>selected row</i> is not blank, a U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>third quote mark</i>).</li>
98533-
<li>If the cell in the second column of the <i>selected row</i> is not blank, the string from the cell in the second column of the <i>selected row</i>.</li>
98534-
<li>If the cell in the second column of the <i>selected row</i> is not blank, a matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step labeled <i>third quote mark</i>).</li>
98535-
</ol>
98536-
98537-
<table>
98538-
<caption>
98539-
Allowed values for public and system identifiers in an <span>obsolete permitted DOCTYPE string</span>.
98540-
</caption>
98541-
<thead>
98542-
<tr>
98543-
<th> Public identifier
98544-
<th> System identifier
98545-
<tbody>
98546-
<tr>
98547-
<td> <code data-x="">-//W3C//DTD&nbsp;HTML&nbsp;4.0//EN</code>
98548-
<td>
98549-
<tr>
98550-
<td> <code data-x="">-//W3C//DTD&nbsp;HTML&nbsp;4.0//EN</code>
98551-
<td> <code data-x="">http://www.w3.org/TR/REC-html40/strict.dtd</code>
98552-
<tr>
98553-
<td> <code data-x="">-//W3C//DTD&nbsp;HTML&nbsp;4.01//EN</code>
98554-
<td>
98555-
<tr>
98556-
<td> <code data-x="">-//W3C//DTD&nbsp;HTML&nbsp;4.01//EN</code>
98557-
<td> <code data-x="">http://www.w3.org/TR/html4/strict.dtd</code>
98558-
<tr>
98559-
<td> <code data-x="">-//W3C//DTD&nbsp;XHTML&nbsp;1.0&nbsp;Strict//EN</code>
98560-
<td> <code data-x="">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</code>
98561-
<tr>
98562-
<td> <code data-x="">-//W3C//DTD&nbsp;XHTML&nbsp;1.1//EN</code>
98563-
<td> <code data-x="">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</code>
98564-
</table>
98565-
98566-
<p>A <span data-x="syntax-doctype">DOCTYPE</span> containing an <span>obsolete permitted DOCTYPE
98567-
string</span> is an <dfn>obsolete permitted DOCTYPE</dfn>. Authors should not use <span
98568-
data-x="obsolete permitted DOCTYPE">obsolete permitted DOCTYPEs</span>, as they are unnecessarily
98569-
long.</p>
98570-
98571-
9857298516

9857398517

9857498518
<h4>Elements</h4>
@@ -104087,44 +104031,7 @@ document.body.appendChild(text);
104087104031
<p>If the DOCTYPE token's name is not a <span>case-sensitive</span> match for the string "<code
104088104032
data-x="">html</code>", or the token's public identifier is not missing, or the token's system
104089104033
identifier is neither missing nor a <span>case-sensitive</span> match for the string
104090-
"<code>about:legacy-compat</code>", and none of the sets of conditions in the following list are
104091-
matched, then there is a <span>parse error</span>.</p>
104092-
104093-
<ul>
104094-
104095-
<!-- only things that trigger no-quirks mode and were valid in some other spec are allowed in
104096-
this list -->
104097-
104098-
<li>The DOCTYPE token's name is a <span>case-sensitive</span> match for the string "<code
104099-
data-x="">html</code>", the token's public identifier is the <span>case-sensitive</span> string
104100-
"<code data-x="">-//W3C//DTD&nbsp;HTML&nbsp;4.0//EN</code>", and the token's system identifier
104101-
is either missing or the <span>case-sensitive</span> string "<code
104102-
data-x="">http://www.w3.org/TR/REC-html40/strict.dtd</code>".</li>
104103-
104104-
<li>The DOCTYPE token's name is a <span>case-sensitive</span> match for the string "<code
104105-
data-x="">html</code>", the token's public identifier is the <span>case-sensitive</span> string
104106-
"<code data-x="">-//W3C//DTD&nbsp;HTML&nbsp;4.01//EN</code>", and the token's system identifier
104107-
is either missing or the <span>case-sensitive</span> string "<code
104108-
data-x="">http://www.w3.org/TR/html4/strict.dtd</code>".</li>
104109-
104110-
<li>The DOCTYPE token's name is a <span>case-sensitive</span> match for the string "<code
104111-
data-x="">html</code>", the token's public identifier is the <span>case-sensitive</span> string
104112-
"<code data-x="">-//W3C//DTD&nbsp;XHTML&nbsp;1.0&nbsp;Strict//EN</code>", and the token's system
104113-
identifier is the <span>case-sensitive</span> string "<code
104114-
data-x="">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</code>".</li>
104115-
104116-
<li>The DOCTYPE token's name is a <span>case-sensitive</span> match for the string "<code
104117-
data-x="">html</code>", the token's public identifier is the <span>case-sensitive</span> string
104118-
"<code data-x="">-//W3C//DTD&nbsp;XHTML&nbsp;1.1//EN</code>", and the token's system identifier
104119-
is the <span>case-sensitive</span> string "<code
104120-
data-x="">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</code>".</li>
104121-
104122-
</ul>
104123-
104124-
<p>Conformance checkers may, based on the values (including presence or lack thereof) of the
104125-
DOCTYPE token's name, public identifier, or system identifier, switch to a conformance checking
104126-
mode for another language (e.g. based on the DOCTYPE token a conformance checker could recognize
104127-
that the document is an HTML4-era document, and defer to an HTML4 conformance checker.)</p>
104034+
"<code>about:legacy-compat</code>", then there is a <span>parse error</span>.</p>
104128104035

104129104036
<p>Append a <code>DocumentType</code> node to the <code>Document</code> node, with the <code
104130104037
data-x="">name</code> attribute set to the name given in the DOCTYPE token, or the empty string
@@ -112134,10 +112041,6 @@ if (s = prompt('What is your name?')) {
112134112041
regardless is to help legacy user agents that do not support <code>input</code> elements with
112135112042
<code data-x="">type="number"</code> to still render the text control with a useful width.</p>
112136112043

112137-
<p class="note">In <span>the HTML syntax</span>, specifying a <span
112138-
data-x="syntax-DOCTYPE">DOCTYPE</span> that is an <span>obsolete permitted DOCTYPE</span> will also
112139-
trigger a warning.</p>
112140-
112141112044

112142112045
<div w-nodev>
112143112046

@@ -112155,9 +112058,6 @@ if (s = prompt('What is your name?')) {
112155112058

112156112059
<ul><!-- downplayed list -->
112157112060

112158-
<li><p>The presence of an <span>obsolete permitted DOCTYPE</span> in an <span data-x="HTML
112159-
documents">HTML document</span>.</p></li>
112160-
112161112061
<li><p>The presence of a <code data-x="attr-img-border">border</code> attribute on an
112162112062
<code>img</code> element if its value is the string "<code data-x="">0</code>".</p></li>
112163112063

0 commit comments

Comments
 (0)