[html5] r1583 - /
whatwg at whatwg.org
whatwg at whatwg.org
Fri May 9 00:52:24 PDT 2008
Author: ianh
Date: 2008-05-09 00:52:23 -0700 (Fri, 09 May 2008)
New Revision: 1583
Modified:
index
source
Log:
[c] (0) Clarify where elements can be used; explicitly allow orphan nodes.
Modified: index
===================================================================
--- index 2008-05-09 07:36:34 UTC (rev 1582)
+++ index 2008-05-09 07:52:23 UTC (rev 1583)
@@ -6222,11 +6222,11 @@
there are no other element nodes or text nodes (other than <a
href="#inter-element">inter-element whitespace</a>) between them.
- <p>Authors must only use <a href="#elements1">elements in the HTML
- namespace</a> in the contexts where they are allowed, as defined for each
- element. For XML compound documents, these contexts could be inside
- elements from other namespaces, if those elements are defined as providing
- the relevant contexts.
+ <p>Authors must not use <a href="#elements1">elements in the HTML
+ namespace</a> anywhere except where they are explicitly allowed, as
+ defined for each element. For XML compound documents, these contexts could
+ be inside elements from other namespaces, if those elements are defined as
+ providing the relevant contexts.
<div class=example>
<p>The SVG specification defines the SVG <code>foreignObject</code>
@@ -6240,6 +6240,21 @@
<code>foreignObject</code> element is conforming.</p>
</div>
+ <p>In addition, <a href="#elements1">elements in the HTML namespace</a> may
+ be orphan nodes (i.e. without a parent node).
+
+ <div class=example>
+ <p>For example, creating a <code><a href="#td">td</a></code> element and
+ storing it in a global variable in a script is conforming, even though
+ <code><a href="#td">td</a></code> elements are otherwise only supposed to
+ be used inside <code><a href="#tr">tr</a></code> elements.</p>
+
+ <pre>var data = {
+ name: "Banana",
+ cell: document.createElement('td'),
+};</pre>
+ </div>
+
<h4 id=kinds><span class=secno>3.3.3 </span>Kinds of content</h4>
<p>Each element in HTML falls into zero or more categories that group
Modified: source
===================================================================
--- source 2008-05-09 07:36:34 UTC (rev 1582)
+++ source 2008-05-09 07:52:23 UTC (rev 1583)
@@ -4722,11 +4722,11 @@
and there are no other element nodes or text nodes (other than
<span>inter-element whitespace</span>) between them.</p>
- <p>Authors must only use <span>elements in the HTML namespace</span>
- in the contexts where they are allowed, as defined for each
- element. For XML compound documents, these contexts could be inside
- elements from other namespaces, if those elements are defined as
- providing the relevant contexts.</p>
+ <p>Authors must not use <span>elements in the HTML namespace</span>
+ anywhere except where they are explicitly allowed, as defined for
+ each element. For XML compound documents, these contexts could be
+ inside elements from other namespaces, if those elements are defined
+ as providing the relevant contexts.</p>
<div class="example">
<p>The SVG specification defines the SVG <code>foreignObject</code>
@@ -4740,8 +4740,25 @@
conforming.</p>
</div>
+ <p>In addition, <span>elements in the HTML namespace</span> may be
+ orphan nodes (i.e. without a parent node).</p>
+ <div class="example">
+ <p>For example, creating a <code>td</code> element and storing it
+ in a global variable in a script is conforming, even though
+ <code>td</code> elements are otherwise only supposed to be used
+ inside <code>tr</code> elements.</p>
+
+ <pre>var data = {
+ name: "Banana",
+ cell: document.createElement('td'),
+};</pre>
+
+ </div>
+
+
+
<h4>Kinds of content</h4>
<p>Each element in HTML falls into zero or more categories that
More information about the Commit-Watchers
mailing list