Skip to content

Commit

Permalink
[ct] (0) Lower-case the DOCTYPE name so that UAs can do case-sensitiv…
Browse files Browse the repository at this point in the history
…e matches on interned strings instead of case-insensitive matches. DOCTYPE name is now lowercase in the DOM (to match XHTML case -- might as well keep the differences minimal).

git-svn-id: http://svn.whatwg.org/webapps@2502 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 2, 2008
1 parent 7b8ebc7 commit d9999ab
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 21 deletions.
32 changes: 22 additions & 10 deletions index
Expand Up @@ -46925,6 +46925,12 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<i>force-quirks flag</i> to <i>on</i>. Emit the token. Switch to
the <a href=#data-state>data state</a>.</dd>

<dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
<dd>Create a new DOCTYPE token. Set the token's name to the
lowercase version of the input character (add 0x0020 to the
character's code point). Switch to the <a href=#doctype-name-state>DOCTYPE name
state</a>.</dd>

<dt>EOF</dt>
<dd><a href=#parse-error>Parse error</a>. Create a new DOCTYPE token. Set its
<i>force-quirks flag</i> to <i>on</i>. Emit the token. Reconsume
Expand All @@ -46950,6 +46956,11 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dd>Emit the current DOCTYPE token. Switch to the <a href=#data-state>data
state</a>.</dd>

<dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
<dd>Append the lowercase version of the input character (add 0x0020
to the character's code point) to the current DOCTYPE token's
name. Stay in the <a href=#doctype-name-state>DOCTYPE name state</a>.</dd>

<dt>EOF</dt>
<dd><a href=#parse-error>Parse error</a>. Set the DOCTYPE token's
<i>force-quirks flag</i> to <i>on</i>. Emit that DOCTYPE token.
Expand Down Expand Up @@ -47743,16 +47754,17 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>A DOCTYPE token</dt>
<dd>

<p>If the DOCTYPE token's <code title="">name</code> is not an
<a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">HTML</code>", or if the token's public identifier is
neither missing nor equal to the string
"<code>XSLT-compat</code>", or if the token's system identifier is
not missing, then there is a <a href=#parse-error>parse error</a> (this is the
<dfn id=doctype-parse-error>DOCTYPE parse error</dfn>). Conformance checkers may, instead
of reporting this error, switch to a conformance checking mode for
another language (e.g. based on the DOCTYPE token a conformance
checker could recognize that the document is an HTML4-era
document, and defer to an HTML4 conformance checker.)</p>
<p>If the DOCTYPE token's <code title="">name</code> is not a
<a href=#case-sensitive>case-sensitive</a> match for the string "<code title="">html</code>", or if the token's public identifier is
neither missing nor a <a href=#case-sensitive>case-sensitive</a> match for the
string "<code>XSLT-compat</code>", or if the token's system
identifier is not missing, then there is a <a href=#parse-error>parse
error</a> (this is the <dfn id=doctype-parse-error>DOCTYPE parse
error</dfn>). Conformance checkers may, instead of reporting this
error, switch to a conformance checking mode for another language
(e.g. based on the DOCTYPE token a conformance checker could
recognize that the document is an HTML4-era document, and defer to
an HTML4 conformance checker.)</p>

<p>Append a <code>DocumentType</code> node to the
<code>Document</code> node, with the <code title="">name</code>
Expand Down
34 changes: 23 additions & 11 deletions source
Expand Up @@ -53545,6 +53545,12 @@ interface <dfn>MessageChannel</dfn> {
<i>force-quirks flag</i> to <i>on</i>. Emit the token. Switch to
the <span>data state</span>.</dd>

<dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
<dd>Create a new DOCTYPE token. Set the token's name to the
lowercase version of the input character (add 0x0020 to the
character's code point). Switch to the <span>DOCTYPE name
state</span>.</dd>

<dt>EOF</dt>
<dd><span>Parse error</span>. Create a new DOCTYPE token. Set its
<i>force-quirks flag</i> to <i>on</i>. Emit the token. Reconsume
Expand Down Expand Up @@ -53575,6 +53581,11 @@ interface <dfn>MessageChannel</dfn> {
<dd>Emit the current DOCTYPE token. Switch to the <span>data
state</span>.</dd>

<dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
<dd>Append the lowercase version of the input character (add 0x0020
to the character's code point) to the current DOCTYPE token's
name. Stay in the <span>DOCTYPE name state</span>.</dd>

<dt>EOF</dt>
<dd><span>Parse error</span>. Set the DOCTYPE token's
<i>force-quirks flag</i> to <i>on</i>. Emit that DOCTYPE token.
Expand Down Expand Up @@ -54467,17 +54478,18 @@ interface <dfn>MessageChannel</dfn> {
<dt>A DOCTYPE token</dt>
<dd>

<p>If the DOCTYPE token's <code title="">name</code> is not an
<span>ASCII case-insensitive</span> match for the string "<code
title="">HTML</code>", or if the token's public identifier is
neither missing nor equal to the string
"<code>XSLT-compat</code>", or if the token's system identifier is
not missing, then there is a <span>parse error</span> (this is the
<dfn>DOCTYPE parse error</dfn>). Conformance checkers may, instead
of reporting this error, switch to a conformance checking mode for
another language (e.g. based on the DOCTYPE token a conformance
checker could recognize that the document is an HTML4-era
document, and defer to an HTML4 conformance checker.)</p>
<p>If the DOCTYPE token's <code title="">name</code> is not a
<span>case-sensitive</span> match for the string "<code
title="">html</code>", or if the token's public identifier is
neither missing nor a <span>case-sensitive</span> match for the
string "<code>XSLT-compat</code>", or if the token's system
identifier is not missing, then there is a <span>parse
error</span> (this is the <dfn>DOCTYPE parse
error</dfn>). Conformance checkers may, instead of reporting this
error, switch to a conformance checking mode for another language
(e.g. based on the DOCTYPE token a conformance checker could
recognize that the document is an HTML4-era document, and defer to
an HTML4 conformance checker.)</p>

<p>Append a <code>DocumentType</code> node to the
<code>Document</code> node, with the <code title="">name</code>
Expand Down

0 comments on commit d9999ab

Please sign in to comment.