[html5] r1308 - /
whatwg at whatwg.org
whatwg at whatwg.org
Sun Mar 2 16:43:45 PST 2008
Author: ianh
Date: 2008-03-02 16:43:43 -0800 (Sun, 02 Mar 2008)
New Revision: 1308
Modified:
index
source
Log:
[e] (0) Lay the groundwork for merging phases and insertion modes
Modified: index
===================================================================
--- index 2008-03-02 22:53:06 UTC (rev 1307)
+++ index 2008-03-03 00:43:43 UTC (rev 1308)
@@ -24,7 +24,7 @@
<h1 id=html-5>HTML 5</h1>
- <h2 class="no-num no-toc" id=working>Working Draft — 2 March 2008</h2>
+ <h2 class="no-num no-toc" id=working>Working Draft — 3 March 2008</h2>
<p>You can take part in this work. <a
href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -1637,7 +1637,10 @@
trailing end phase</a>
</ul>
- <li><a href="#the-end"><span class=secno>8.2.5 </span>The End</a>
+ <li><a href="#the-unexpected"><span class=secno>8.2.5 </span>The
+ unexpected end</a>
+
+ <li><a href="#the-end"><span class=secno>8.2.6 </span>The end</a>
</ul>
<li><a href="#namespaces"><span class=secno>8.3 </span>Namespaces</a>
@@ -29815,7 +29818,7 @@
<!-- next three paragraphs are similar to the navigate-text section,
keep them in sync -->
- <p>Then, the user agent must act as if it had <a href="#stops" title="stop
+ <p>Then, the user agent must act as if it had <a href="#stops0" title="stop
parsing">stopped parsing</a>.
<p>Upon creation of the <code>Document</code> object, the user agent must
@@ -29852,7 +29855,7 @@
<!-- next three paragraphs are similar to the navigate-text section,
keep them in sync -->
- <p>Then, the user agent must act as if it had <a href="#stops" title="stop
+ <p>Then, the user agent must act as if it had <a href="#stops0" title="stop
parsing">stopped parsing</a>.
<p>Upon creation of the <code>Document</code> object, the user agent must
@@ -29886,7 +29889,7 @@
keep them in sync -->
<p>Once the page has been set up, the user agent must act as if it had <a
- href="#stops" title="stop parsing">stopped parsing</a>.
+ href="#stops0" title="stop parsing">stopped parsing</a>.
<p>Upon creation of the <code>Document</code> object, the user agent must
run the <a href="#application3"
@@ -41378,47 +41381,6 @@
<p>Tokens in the main phase must be handled as follows:
<dl class=switch>
- <dt>A DOCTYPE token
-
- <dd>
- <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
-
- <dt>A start tag whose tag name is "html"
-
- <dd>
- <p>If this start tag token was not the first start tag token, then it is
- a <a href="#parse0">parse error</a>.</p>
-
- <p>For each attribute on the token, check to see if the attribute is
- already present on the top element of the <a href="#stack">stack of open
- elements</a>. If it is not, add the attribute and its corresponding
- value to that element.</p>
-
- <dt>An end-of-file token
-
- <dd>
- <p><a href="#generate">Generate implied end tags.</a></p>
-
- <p>If there are more than two nodes on the <a href="#stack">stack of open
- elements</a>, or if there are two nodes but the second node is not a
- <code><a href="#body0">body</a></code> node, this is a <a
- href="#parse0">parse error</a>.</p>
-
- <p>Otherwise, if the parser was originally created as part of the <a
- href="#html-fragment0">HTML fragment parsing algorithm</a>, and there's
- more than one element in the <a href="#stack">stack of open
- elements</a>, and the second node on the <a href="#stack">stack of open
- elements</a> is not a <code><a href="#body0">body</a></code> node, then
- this is a <a href="#parse0">parse error</a>. (<a
- href="#fragment">fragment case</a>)</p>
-
- <p><a href="#stops">Stop parsing.</a></p>
-
- <p class=big-issue>This fails because it doesn't imply HEAD and BODY
- tags. We should probably expand out the insertion modes and merge them
- with phases and then put the three things here into each insertion mode
- instead of trying to factor them out so carefully.</p>
-
<dt>Anything else
<dd>
@@ -41432,6 +41394,11 @@
<p>Handle the token as follows:</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -41448,6 +41415,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>A start tag whose tag name is "head"
<dd>
@@ -41514,6 +41493,11 @@
<p>Handle the token as follows.</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -41530,6 +41514,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>A start tag whose tag name is one of: "base", "link"
<dd>
@@ -41754,6 +41750,23 @@
<dd>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>An end tag whose tag name is "noscript"
<dd>
@@ -41805,6 +41818,11 @@
<p>Handle the token as follows:</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -41821,6 +41839,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>A start tag whose tag name is "body"
<dd>
@@ -41874,6 +41904,11 @@
<p>Handle the token as follows:</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token
<dd>
@@ -41891,6 +41926,22 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>If this start tag token was not the first start tag token, then it
+ is a <a href="#parse0">parse error</a>.</p>
+
+ <p>For each attribute on the token, check to see if the attribute is
+ already present on the top element of the <a href="#stack">stack of
+ open elements</a>. If it is not, add the attribute and its
+ corresponding value to that element.</p>
+
<dt>A start tag token whose tag name is one of: "base", "link",
"meta", "script", "style"
@@ -42840,6 +42891,11 @@
<dd>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -42856,6 +42912,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>A start tag whose tag name is "caption"
<dd>
@@ -43070,6 +43138,11 @@
<dd>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -43086,6 +43159,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>A start tag whose tag name is "col"
<dd>
@@ -43410,6 +43495,11 @@
<p>Handle the token as follows:</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token
<dd>
@@ -43424,6 +43514,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>A start tag whose tag name is "option"
<dd>
@@ -43516,6 +43618,11 @@
<p>Handle the token as follows:</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -43534,6 +43641,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>An end tag whose tag name is "html"
<dd>
@@ -43563,6 +43682,11 @@
<p>Handle the token as follows:</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -43579,6 +43703,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>A start tag whose tag name is "frameset"
<dd>
@@ -43632,6 +43768,11 @@
<p>Handle the token as follows:</p>
<dl class=switch>
+ <dt>An end-of-file token
+
+ <dd>
+ <p><a href="#stops">Stop parsing, with prejudice.</a></p>
+
<dt>A character token that is one of one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE
@@ -43648,6 +43789,18 @@
title="">data</code> attribute set to the data given in the comment
token.</p>
+ <dt>A DOCTYPE token
+
+ <dd>
+ <p><a href="#parse0">Parse error</a>. Ignore the token.</p>
+
+ <dt>A start tag whose tag name is "html"
+
+ <dd>
+ <p>Process the token as if the <a href="#insertion0">insertion
+ mode</a> had been "<a href="#in-body" title="insertion mode: in
+ body">in body</a>".</p>
+
<dt>An end tag whose tag name is "html"
<dd>
@@ -43720,12 +43873,45 @@
<dt>An end-of-file token
<dd>
- <p><a href="#stops">Stop parsing</a>.</p>
+ <p><a href="#stops0">Stop parsing</a>.</p>
</dl>
- <h4 id=the-end><span class=secno>8.2.5 </span>The End</h4>
+ <h4 id=the-unexpected><span class=secno>8.2.5 </span>The unexpected end</h4>
- <p>Once the user agent <dfn id=stops title="stop parsing">stops
+ <p>When the user agent is to <dfn id=stops title="stop parsing, with
+ prejudice">stops parsing, with prejudice</dfn>, the user agent must follow
+ the steps in this section.
+
+ <ol>
+ <li>
+ <p><a href="#generate">Generate implied end tags.</a></p>
+
+ <li>
+ <p>If there are more than two nodes on the <a href="#stack">stack of open
+ elements</a>, or if there are two nodes but the second node is not a
+ <code><a href="#body0">body</a></code> node, this is a <a
+ href="#parse0">parse error</a>.</p>
+
+ <p>Otherwise, if the parser was originally created as part of the <a
+ href="#html-fragment0">HTML fragment parsing algorithm</a>, and there's
+ more than one element in the <a href="#stack">stack of open
+ elements</a>, and the second node on the <a href="#stack">stack of open
+ elements</a> is not a <code><a href="#body0">body</a></code> node, then
+ this is a <a href="#parse0">parse error</a>. (<a
+ href="#fragment">fragment case</a>)</p>
+
+ <p class=big-issue>This fails because it doesn't imply HEAD and BODY
+ tags. We should probably expand out the insertion modes and merge them
+ with phases and then put the three things here into each insertion mode
+ instead of trying to factor them out so carefully.</p>
+
+ <li>
+ <p><a href="#stops0">Stop parsing</a> (see the next section).
+ </ol>
+
+ <h4 id=the-end><span class=secno>8.2.6 </span>The end</h4>
+
+ <p>Once the user agent <dfn id=stops0 title="stop parsing">stops
parsing</dfn> the document, the user agent must follow the steps in this
section.
Modified: source
===================================================================
--- source 2008-03-02 22:53:06 UTC (rev 1307)
+++ source 2008-03-03 00:43:43 UTC (rev 1308)
@@ -38523,48 +38523,6 @@
<dl class="switch">
- <dt>A DOCTYPE token</dt>
- <dd>
- <p><span>Parse error</span>. Ignore the token.</p>
- </dd>
-
- <dt>A start tag whose tag name is "html"</dt>
- <dd>
- <p>If this start tag token was not the first start tag token, then
- it is a <span>parse error</span>.</p>
- <p>For each attribute on the token, check to see if the attribute
- is already present on the top element of the <span>stack of open
- elements</span>. If it is not, add the attribute and its
- corresponding value to that element.</p>
- </dd>
-
- <dt>An end-of-file token</dt>
- <dd>
-
- <p><span>Generate implied end tags.</span></p>
-
- <p>If there are more than two nodes on the <span>stack of open
- elements</span>, or if there are two nodes but the second node is
- not a <code>body</code> node, this is a <span>parse
- error</span>.</p>
-
- <p>Otherwise, if the parser was originally created as part of the
- <span>HTML fragment parsing algorithm</span>, and there's more
- than one element in the <span>stack of open elements</span>, and
- the second node on the <span>stack of open elements</span> is not
- a <code>body</code> node, then this is a <span>parse
- error</span>. (<span>fragment case</span>)</p>
-
- <p><span>Stop parsing.</span></p>
-
- <p class="big-issue">This fails because it doesn't imply HEAD and
- BODY tags. We should probably expand out the insertion modes and
- merge them with phases and then put the three things here into
- each insertion mode instead of trying to factor them out so
- carefully.</p>
-
- </dd>
-
<dt>Anything else</dt>
<dd>
@@ -38579,6 +38537,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -38595,6 +38558,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>A start tag whose tag name is "head"</dt>
<dd>
@@ -38674,6 +38649,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -38690,6 +38670,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>A start tag whose tag name is one of: "base", "link"</dt>
<dd>
<p><span title="insert an html element">Insert an HTML
@@ -38922,6 +38914,23 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>An end tag whose tag name is "noscript"</dt>
<dd>
@@ -38977,6 +38986,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -38993,6 +39007,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>A start tag whose tag name is "body"</dt>
<dd>
@@ -39055,6 +39081,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token</dt>
<dd>
@@ -39073,6 +39104,21 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>If this start tag token was not the first start tag token, then
+ it is a <span>parse error</span>.</p>
+ <p>For each attribute on the token, check to see if the attribute
+ is already present on the top element of the <span>stack of open
+ elements</span>. If it is not, add the attribute and its
+ corresponding value to that element.</p>
+ </dd>
+
<dt>A start tag token whose tag name is one of: "base", "link",
"meta", "script", "style"</dt>
<dd>
@@ -40073,6 +40119,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -40089,6 +40140,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>A start tag whose tag name is "caption"</dt>
<dd>
@@ -40312,6 +40375,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -40328,6 +40396,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>A start tag whose tag name is "col"</dt>
<dd>
<p><span title="insert an HTML element">Insert a
@@ -40686,6 +40766,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token</dt>
<dd>
<p><span title="append a character">Append the token's
@@ -40699,6 +40784,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>A start tag whose tag name is "option"</dt>
<dd>
@@ -40809,6 +40906,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -40827,6 +40929,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>An end tag whose tag name is "html"</dt>
<dd>
@@ -40862,6 +40976,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -40878,6 +40997,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>A start tag whose tag name is "frameset"</dt>
<dd>
<p><span title="Insert an HTML element">Insert a
@@ -40935,6 +41066,11 @@
<dl class="switch">
+ <dt>An end-of-file token</dt>
+ <dd>
+ <p><span>Stop parsing, with prejudice.</span></p>
+ </dd>
+
<dt>A character token that is one of one of U+0009
CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
TABULATION, U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN (CR),-->
@@ -40951,6 +41087,18 @@
the data given in the comment token.</p>
</dd>
+ <dt>A DOCTYPE token</dt>
+ <dd>
+ <p><span>Parse error</span>. Ignore the token.</p>
+ </dd>
+
+ <dt>A start tag whose tag name is "html"</dt>
+ <dd>
+ <p>Process the token as if the <span>insertion mode</span> had
+ been "<span title="insertion mode: in body">in
+ body</span>".</p>
+ </dd>
+
<dt>An end tag whose tag name is "html"</dt>
<dd>
<p>Switch to <span>the trailing end phase</span>.</p>
@@ -41033,8 +41181,47 @@
</dl>
- <h4>The End</h4>
+ <h4>The unexpected end</h4>
+ <p>When the user agent is to <dfn title="stop parsing, with
+ prejudice">stops parsing, with prejudice</dfn>, the user agent must
+ follow the steps in this section.</p>
+
+ <ol>
+
+ <li>
+ <p><span>Generate implied end tags.</span></p>
+ </li>
+
+ <li>
+
+ <p>If there are more than two nodes on the <span>stack of open
+ elements</span>, or if there are two nodes but the second node is
+ not a <code>body</code> node, this is a <span>parse
+ error</span>.</p>
+
+ <p>Otherwise, if the parser was originally created as part of the
+ <span>HTML fragment parsing algorithm</span>, and there's more
+ than one element in the <span>stack of open elements</span>, and
+ the second node on the <span>stack of open elements</span> is not
+ a <code>body</code> node, then this is a <span>parse
+ error</span>. (<span>fragment case</span>)</p>
+
+ <p class="big-issue">This fails because it doesn't imply HEAD and
+ BODY tags. We should probably expand out the insertion modes and
+ merge them with phases and then put the three things here into
+ each insertion mode instead of trying to factor them out so
+ carefully.</p>
+
+ </li>
+
+ <li><p><span>Stop parsing</span> (see the next section).</p></li>
+
+ </ol>
+
+
+ <h4>The end</h4>
+
<p>Once the user agent <dfn title="stop parsing">stops parsing</dfn>
the document, the user agent must follow the steps in this
section.</p>
More information about the Commit-Watchers
mailing list