Skip to content

Commit

Permalink
[ct] (3) Make </caption> optional, since that seems to be interoperab…
Browse files Browse the repository at this point in the history
…ly supported already anyway

Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@8433 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 28, 2014
1 parent 4def398 commit 759ee62
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 17 deletions.
22 changes: 16 additions & 6 deletions complete.html
Expand Up @@ -34329,7 +34329,9 @@ <h4 id=the-caption-element><span class=secno>4.9.2 </span>The <dfn><code>caption
<dt><a href=#element-dfn-content-model title=element-dfn-content-model>Content model</a>:</dt>
<dd><a href=#flow-content>Flow content</a>, but with no descendant <code><a href=#the-table-element>table</a></code> elements.</dd>
<dt><a href=#element-dfn-tag-omission title=element-dfn-tag-omission>Tag omission in text/html</a>:</dt>
<dd>Neither tag is omissible.</dd>
<dd>A <code><a href=#the-caption-element>caption</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> can be omitted if
the <code><a href=#the-caption-element>caption</a></code> element is not immediately followed by a <a href=#space-character>space character</a> or
a <a href=#syntax-comments title=syntax-comments>comment</a>.</dd>
<dt><a href=#element-dfn-attributes title=element-dfn-attributes>Content attributes</a>:</dt>
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
Expand Down Expand Up @@ -84959,6 +84961,11 @@ <h5 id=optional-tags><span class=secno>12.1.2.4 </span>Optional tags</h5>
the <code><a href=#the-colgroup-element>colgroup</a></code> element is not immediately followed by a <a href=#space-character>space character</a> or
a <a href=#syntax-comments title=syntax-comments>comment</a>.</p>

<!-- </caption> -->
<p>A <code><a href=#the-caption-element>caption</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> may be omitted if
the <code><a href=#the-caption-element>caption</a></code> element is not immediately followed by a <a href=#space-character>space character</a> or
a <a href=#syntax-comments title=syntax-comments>comment</a>.</p>

<!-- </thead> -->
<p>A <code><a href=#the-thead-element>thead</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> may be omitted if
the <code><a href=#the-thead-element>thead</a></code> element is immediately followed by a <code><a href=#the-tbody-element>tbody</a></code> or
Expand Down Expand Up @@ -91523,15 +91530,18 @@ <h6 id=parsing-main-intabletext><span class=secno>12.2.5.4.10 </span>The "<dfn t
"th", "thead", "tr"</dt> <dt>An end tag whose tag name is "table"</dt>
<dd>

<p><a href=#parse-error>Parse error</a>.</p>

<!-- fake </caption> -->
<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope title="has an element in table
scope">have a <code>caption</code> element in table scope</a>, ignore the token.
(<a href=#fragment-case>fragment case</a>)</p>
scope">have a <code>caption</code> element in table scope</a>, this is a <a href=#parse-error>parse
error</a>; ignore the token. (<a href=#fragment-case>fragment case</a>)</p>

<p>Otherwise:</p>

<!-- fake </caption> -->
<p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</p>

<p>Now, if the <a href=#current-node>current node</a> is not a <code><a href=#the-caption-element>caption</a></code> element, then this is a
<a href=#parse-error>parse error</a>.</p>

<p>Pop elements from this stack until a <code><a href=#the-caption-element>caption</a></code> element has been popped from the
stack.</p>

Expand Down
22 changes: 16 additions & 6 deletions index
Expand Up @@ -34329,7 +34329,9 @@ side in the right column.&lt;/p&gt;
<dt><a href=#element-dfn-content-model title=element-dfn-content-model>Content model</a>:</dt>
<dd><a href=#flow-content>Flow content</a>, but with no descendant <code><a href=#the-table-element>table</a></code> elements.</dd>
<dt><a href=#element-dfn-tag-omission title=element-dfn-tag-omission>Tag omission in text/html</a>:</dt>
<dd>Neither tag is omissible.</dd>
<dd>A <code><a href=#the-caption-element>caption</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> can be omitted if
the <code><a href=#the-caption-element>caption</a></code> element is not immediately followed by a <a href=#space-character>space character</a> or
a <a href=#syntax-comments title=syntax-comments>comment</a>.</dd>
<dt><a href=#element-dfn-attributes title=element-dfn-attributes>Content attributes</a>:</dt>
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
Expand Down Expand Up @@ -84959,6 +84961,11 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>
the <code><a href=#the-colgroup-element>colgroup</a></code> element is not immediately followed by a <a href=#space-character>space character</a> or
a <a href=#syntax-comments title=syntax-comments>comment</a>.</p>

<!-- </caption> -->
<p>A <code><a href=#the-caption-element>caption</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> may be omitted if
the <code><a href=#the-caption-element>caption</a></code> element is not immediately followed by a <a href=#space-character>space character</a> or
a <a href=#syntax-comments title=syntax-comments>comment</a>.</p>

<!-- </thead> -->
<p>A <code><a href=#the-thead-element>thead</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> may be omitted if
the <code><a href=#the-thead-element>thead</a></code> element is immediately followed by a <code><a href=#the-tbody-element>tbody</a></code> or
Expand Down Expand Up @@ -91523,15 +91530,18 @@ document.body.appendChild(text);
"th", "thead", "tr"</dt> <dt>An end tag whose tag name is "table"</dt>
<dd>

<p><a href=#parse-error>Parse error</a>.</p>

<!-- fake </caption> -->
<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-table-scope title="has an element in table
scope">have a <code>caption</code> element in table scope</a>, ignore the token.
(<a href=#fragment-case>fragment case</a>)</p>
scope">have a <code>caption</code> element in table scope</a>, this is a <a href=#parse-error>parse
error</a>; ignore the token. (<a href=#fragment-case>fragment case</a>)</p>

<p>Otherwise:</p>

<!-- fake </caption> -->
<p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</p>

<p>Now, if the <a href=#current-node>current node</a> is not a <code><a href=#the-caption-element>caption</a></code> element, then this is a
<a href=#parse-error>parse error</a>.</p>

<p>Pop elements from this stack until a <code><a href=#the-caption-element>caption</a></code> element has been popped from the
stack.</p>

Expand Down
18 changes: 13 additions & 5 deletions source
Expand Up @@ -94598,6 +94598,11 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
the <code>colgroup</code> element is not immediately followed by a <span>space character</span> or
a <span data-x="syntax-comments">comment</span>.</p>

<!-- </caption> -->
<p>A <code>caption</code> element's <span data-x="syntax-end-tag">end tag</span> may be omitted if
the <code>caption</code> element is not immediately followed by a <span>space character</span> or
a <span data-x="syntax-comments">comment</span>.</p>

<!-- </thead> -->
<p>A <code>thead</code> element's <span data-x="syntax-end-tag">end tag</span> may be omitted if
the <code>thead</code> element is immediately followed by a <code>tbody</code> or
Expand Down Expand Up @@ -102033,15 +102038,18 @@ document.body.appendChild(text);
"th", "thead", "tr"</dt> <dt>An end tag whose tag name is "table"</dt>
<dd>

<p><span>Parse error</span>.</p>

<!-- fake </caption> -->
<p>If the <span>stack of open elements</span> does not <span data-x="has an element in table
scope">have a <code>caption</code> element in table scope</span>, ignore the token.
(<span>fragment case</span>)</p>
scope">have a <code>caption</code> element in table scope</span>, this is a <span>parse
error</span>; ignore the token. (<span>fragment case</span>)</p>

<p>Otherwise:</p>

<!-- fake </caption> -->
<p><span>Generate implied end tags</span>.</p>

<p>Now, if the <span>current node</span> is not a <code>caption</code> element, then this is a
<span>parse error</span>.</p>

<p>Pop elements from this stack until a <code>caption</code> element has been popped from the
stack.</p>

Expand Down

0 comments on commit 759ee62

Please sign in to comment.