[html5] r1114 - /
whatwg at whatwg.org
whatwg at whatwg.org
Wed Oct 31 02:08:09 PDT 2007
Author: ianh
Date: 2007-10-31 02:08:08 -0700 (Wed, 31 Oct 2007)
New Revision: 1114
Modified:
index
source
Log:
[c] (0) Begone, significant inline content!
Modified: index
===================================================================
--- index 2007-10-31 02:30:33 UTC (rev 1113)
+++ index 2007-10-31 09:08:08 UTC (rev 1114)
@@ -6022,38 +6022,6 @@
href="#table">table</a></code>.
</dl>
- <p>Some elements are defined to have as a content model <dfn
- id=significant>significant inline content</dfn>. This means that at least
- one descendant of the element must be <a href="#significant0">significant
- text</a> or <a href="#embedded0">embedded content</a>.
-
- <p>Unless an element's content model explicitly states that it must contain
- <a href="#significant">significant inline content</a>, simply having no <a
- href="#text-node" title="text node">text nodes</a> and no elements
- satisfies an element whose content model is some kind of inline content.
-
- <p><dfn id=significant0>Significant text</dfn>, for the purposes of
- determining the presence of <a href="#significant">significant inline
- content</a>, consists of any character other than those falling in the <a
- href="http://unicode.org/Public/UNIDATA/UCD.html#General_Category_Values">Unicode
- categories</a> Zs, Zl, Zp, Cc, and Cf. <a
- href="#refsUNICODE">[UNICODE]</a>
-
- <div class=example>
- <p>The following three paragraphs are non-conforming because their content
- model is not satisfied (they all count as empty).</p>
-
- <pre>
-<p></p>
-<p><em> </em></p>
-<p>
- <ol>
- <li></li>
- </ol>
-</p>
-</pre>
- </div>
-
<p><dfn id=embedded0>Embedded content</dfn> consists of elements that
introduce content from other resources into the document, for example
<code><a href="#img">img</a></code>. Embedded content elements can have
@@ -6061,6 +6029,23 @@
the external resource cannot be used (e.g. because it is of an unsupported
format). The element definitions state what the fallback is, if any.
+ <p>As a general rule, elements whose content model allows any <a
+ href="#block-level0">block-level elements</a>, or allows any <a
+ href="#inline-level0">inline-level content</a>, should have either at
+ least one descendant text node that is not <a
+ href="#inter-element">inter-element whitespace</a>, or at least one
+ descendant element node that is <a href="#embedded0">embedded content</a>.
+ For the purposes of this requirement, nodes that are descendants of
+ <code><a href="#del">del</a></code> elements must not be counted as
+ contributing to the ancestors of the <code><a href="#del">del</a></code>
+ element.
+
+ <p>This requirement is not a hard requirement, however, as there are many
+ cases where an element can be empty legitimately, for example when it is
+ used as a placeholder which will later be filled in by a script, or when
+ the element is part of a template and would on most pages be filled in but
+ on some pages is not relevant.
+
<h5 id=transparent><span class=secno>3.3.3.3. </span>Transparent content
models</h5>
@@ -7946,9 +7931,10 @@
href="#style">style</a></code> element must be the child of an <code><a
href="#article">article</a></code>, <code><a
href="#aside">aside</a></code>, <code><a href="#div">div</a></code>, or
- <code><a href="#section0">section</a></code> element, before any <a
- href="#significant0">significant text</a> or any elements other than
- <code><a href="#style">style</a></code> elements.
+ <code><a href="#section0">section</a></code> element, before any text
+ nodes other than <a href="#inter-element">inter-element whitespace</a>,
+ and before any elements other than other <code><a
+ href="#style">style</a></code> elements.
<p id=title-on-style>The <dfn id=title3
title=attr-style-title><code>title</code></dfn> attribute on <code><a
@@ -8413,9 +8399,7 @@
<dt>Content model:
- <dd><a href="#significant" title="significant inline
- content">Significant</a> <a href="#strictly">strictly inline-level
- content</a>.
+ <dd><a href="#strictly">Strictly inline-level content</a>.
<dt>Element-specific attributes:
@@ -8437,9 +8421,6 @@
the highest rank, the <code><a href="#h6">h6</a></code> element has the
lowest rank, and two elements with the same name have equal rank.
- <p>These elements must not be <a href="#significant" title="significant
- inline content">empty</a>.
-
<h4 id=the-header><span class=secno>3.8.8. </span>The <dfn
id=header><code>header</code></dfn> element</h4>
@@ -9183,9 +9164,7 @@
<dt>Content model:
- <dd><a href="#significant" title="significant inline
- content">Significant</a> <a href="#inline-level0">inline-level
- content</a>.
+ <dd><a href="#inline-level0">Inline-level content</a>.
<dt>Element-specific attributes:
@@ -9203,9 +9182,7 @@
<p><code><a href="#p">p</a></code> elements can contain a mixture of <a
href="#strictly">strictly inline-level content</a>, such as text, images,
hyperlinks, etc, and <a href="#structured">structured inline-level
- elements</a>, such as lists, tables, and block quotes. <code><a
- href="#p">p</a></code> elements must not be <a href="#significant"
- title="significant inline content">empty</a>.
+ elements</a>, such as lists, tables, and block quotes.
<div class=example>
<p>The following examples are conforming HTML fragments:</p>
@@ -9917,15 +9894,13 @@
<dd>When used in an element whose content model is only <a
href="#strictly">strictly inline-level content</a>: only <a
- href="#significant" title="significant inline content">significant</a> <a
href="#strictly">strictly inline-level content</a>, but there must be no
<a href="#interactive1" title="interactive elements">interactive</a>
descendants.
- <dd>Otherwise: any <a href="#significant" title="significant inline
- content">significant</a> <a href="#inline-level0">inline-level
- content</a>, but there must be no <a href="#interactive1"
- title="interactive elements">interactive</a> descendants.
+ <dd>Otherwise: any <a href="#inline-level0">inline-level content</a>, but
+ there must be no <a href="#interactive1" title="interactive
+ elements">interactive</a> descendants.
<dt>Element-specific attributes:
@@ -10068,9 +10043,6 @@
aforementioned <a href="#activation0">activation behavior</a> to be
invoked.
- <p>The <code><a href="#a">a</a></code> element must not be <a
- href="#significant" title="significant inline content">empty</a>.
-
<p>The DOM attributes <dfn id=href3
title=dom-a-href><code>href</code></dfn>, <dfn id=ping0
title=dom-a-ping><code>ping</code></dfn>, <dfn id=target1
@@ -17448,9 +17420,7 @@
<h4 id=the-area><span class=secno>3.14.13. </span>The <dfn
id=area><code>area</code></dfn> element</h4>
- <p><a href="#strictly">Strictly inline-level content</a>.</p>
- <!-- XXX as defined, the area element on its own isn't enough to
- satisfy "significant inline-level content" model. should it be? -->
+ <p><a href="#strictly">Strictly inline-level content</a>.
<dl class=element>
<dt>Contexts in which this element may be used:
@@ -18321,9 +18291,7 @@
<dt>Content model:
- <dd><a href="#significant" title="significant inline
- content">Significant</a> <a href="#strictly">strictly inline-level
- content</a>.
+ <dd><a href="#strictly">Strictly inline-level content</a>.
<dt>Element-specific attributes:
@@ -24452,9 +24420,8 @@
<dt>Content model:
<dd>If used as a child of a <code>fieldset</code> or <code><a
- href="#details">details</a></code> element: <a href="#significant"
- title="significant inline content">significant</a> <a
- href="#strictly">strictly inline-level content</a>
+ href="#details">details</a></code> element: <a href="#strictly">strictly
+ inline-level content</a>
<dd>If used as a child of a <code><a href="#figure">figure</a></code>
element: <a href="#inline-level0">inline-level content</a>.
Modified: source
===================================================================
--- source 2007-10-31 02:30:33 UTC (rev 1113)
+++ source 2007-10-31 09:08:08 UTC (rev 1114)
@@ -4524,6 +4524,7 @@
</div>
+
<h4>Kinds of elements</h4>
<p>Each element in HTML falls into zero or more categories that
@@ -4622,37 +4623,6 @@
</dl>
- <p>Some elements are defined to have as a content model
- <dfn>significant inline content</dfn>. This means that at least one
- descendant of the element must be <span>significant text</span> or
- <span>embedded content</span>.</p>
-
- <p>Unless an element's content model explicitly states that it must
- contain <span>significant inline content</span>, simply having no
- <span title="text node">text nodes</span> and no elements satisfies
- an element whose content model is some kind of inline content.</p>
-
- <p><dfn>Significant text</dfn>, for the purposes of determining the
- presence of <span>significant inline content</span>, consists of any
- character other than those falling in the <a
- href="http://unicode.org/Public/UNIDATA/UCD.html#General_Category_Values">Unicode
- categories</a> Zs, Zl, Zp, Cc, and Cf. <a
- href="#refsUNICODE">[UNICODE]</a></p>
-
- <div class="example">
- <p>The following three paragraphs are non-conforming because their
- content model is not satisfied (they all count as empty).</p>
- <pre>
-<p></p>
-<p><em> </em></p>
-<p>
- <ol>
- <li></li>
- </ol>
-</p>
-</pre>
- </div>
-
<p><dfn>Embedded content</dfn> consists of elements that introduce
content from other resources into the document, for example
<code>img</code>. Embedded content elements can have <dfn>fallback
@@ -4660,7 +4630,22 @@
cannot be used (e.g. because it is of an unsupported format). The
element definitions state what the fallback is, if any.</p>
+ <p>As a general rule, elements whose content model allows any
+ <span>block-level elements</span>, or allows any <span>inline-level
+ content</span>, should have either at least one descendant text node
+ that is not <span>inter-element whitespace</span>, or at least one
+ descendant element node that is <span>embedded content</span>. For
+ the purposes of this requirement, nodes that are descendants of
+ <code>del</code> elements must not be counted as contributing to the
+ ancestors of the <code>del</code> element.</p>
+ <p>This requirement is not a hard requirement, however, as there are
+ many cases where an element can be empty legitimately, for example
+ when it is used as a placeholder which will later be filled in by a
+ script, or when the element is part of a template and would on most
+ pages be filled in but on some pages is not relevant.</p>
+
+
<h5>Transparent content models</h5>
<p>Some elements are described as <dfn>transparent</dfn>; they have
@@ -6394,9 +6379,9 @@
<p>If the <code title="attr-style-scoped">scoped</code> attribute
<em>is</em> specified, then the <code>style</code> element must be
the child of an <code>article</code>, <code>aside</code>,
- <code>div</code>, or <code>section</code> element, before any
- <span>significant text</span> or any elements other than
- <code>style</code> elements.</dd>
+ <code>div</code>, or <code>section</code> element, before any text
+ nodes other than <span>inter-element whitespace</span>, and before
+ any elements other than other <code>style</code> elements.</dd>
<p id="title-on-style">The <dfn
title="attr-style-title"><code>title</code></dfn> attribute on
@@ -6785,7 +6770,7 @@
<dt>Contexts in which these elements may be used:</dt>
<dd>Where <span>block-level elements</span> are expected.</dd>
<dt>Content model:</dt>
- <dd><span title="significant inline content">Significant</span> <span>strictly inline-level content</span>.</dd>
+ <dd><span>Strictly inline-level content</span>.</dd>
<dt>Element-specific attributes:</dt>
<dd>None.</dd>
<dt>DOM interface:</dt>
@@ -6802,10 +6787,7 @@
rank, the <code>h6</code> element has the lowest rank, and two
elements with the same name have equal rank.</p>
- <p>These elements must not be <span title="significant inline
- content">empty</span>.</p>
-
<h4>The <dfn><code>header</code></dfn> element</h4>
<p><span title="block-level elements">Block-level element</span>.</p>
@@ -7464,8 +7446,7 @@
<dt>Contexts in which this element may be used:</dt>
<dd>Where <span>block-level elements</span> are expected.</dd>
<dt>Content model:</dt>
- <dd><span title="significant inline content">Significant</span>
- <span>inline-level content</span>.</dd>
+ <dd><span>Inline-level content</span>.</dd>
<dt>Element-specific attributes:</dt>
<dd>None.</dd>
<dt>DOM interface:</dt>
@@ -7478,8 +7459,7 @@
<p><code>p</code> elements can contain a mixture of <span>strictly
inline-level content</span>, such as text, images, hyperlinks, etc,
and <span>structured inline-level elements</span>, such as lists,
- tables, and block quotes. <code>p</code> elements must not be <span
- title="significant inline content">empty</span>.</p>
+ tables, and block quotes.</p>
<div class="example">
<p>The following examples are conforming HTML fragments:</p>
@@ -8070,12 +8050,10 @@
there are no ancestor <span>interactive elements</span>.</dd>
<dt>Content model:</dt>
<dd>When used in an element whose content model is only
- <span>strictly inline-level content</span>: only <span
- title="significant inline content">significant</span> <span>strictly
+ <span>strictly inline-level content</span>: only <span>strictly
inline-level content</span>, but there must be no <span
title="interactive elements">interactive</span> descendants.</dd>
- <dd>Otherwise: any <span title="significant inline
- content">significant</span> <span>inline-level content</span>, but
+ <dd>Otherwise: any <span>inline-level content</span>, but
there must be no <span title="interactive
elements">interactive</span> descendants.</dd>
<dt>Element-specific attributes:</dt>
@@ -8210,9 +8188,6 @@
title="interactive elements">will cause</span> the aforementioned
<span>activation behavior</span> to be invoked.</p>
- <p>The <code>a</code> element must not be <span title="significant
- inline content">empty</span>.</p>
-
<p>The DOM attributes <dfn
title="dom-a-href"><code>href</code></dfn>, <dfn
title="dom-a-ping"><code>ping</code></dfn>, <dfn
@@ -15054,8 +15029,6 @@
<h4>The <dfn><code>area</code></dfn> element</h4>
<p><span>Strictly inline-level content</span>.</p>
- <!-- XXX as defined, the area element on its own isn't enough to
- satisfy "significant inline-level content" model. should it be? -->
<dl class="element">
<dt>Contexts in which this element may be used:</dt>
@@ -15843,7 +15816,7 @@
<dt>Contexts in which this element may be used:</dt>
<dd>As the first element child of a <code>table</code> element.</dd>
<dt>Content model:</dt>
- <dd><span title="significant inline content">Significant</span> <span>strictly inline-level content</span>.</dd>
+ <dd><span>Strictly inline-level content</span>.</dd>
<dt>Element-specific attributes:</dt>
<dd>None.</dd>
<dt>DOM interface:</dt>
@@ -21973,7 +21946,7 @@
<dd>As the first child of a <code>details</code> element.</dd>
<dd>As a child of a <code>figure</code> element, if there are no other <code>legend</code> element children of that element.</dd>
<dt>Content model:</dt>
- <dd>If used as a child of a <code>fieldset</code> or <code>details</code> element: <span title="significant inline content">significant</span> <span>strictly inline-level content</span></dd>
+ <dd>If used as a child of a <code>fieldset</code> or <code>details</code> element: <span>strictly inline-level content</span></dd>
<dd>If used as a child of a <code>figure</code> element: <span>inline-level content</span>.</dd>
<dt>Element-specific attributes:</dt>
<dd>None.</dd>
More information about the Commit-Watchers
mailing list