Browse files

Define what it means for a node to be empty (hint: its length is zero).

  • Loading branch information...
1 parent a6b9ed1 commit 5b1920e4f1da0abb9a42f0309f23b0b16f4f6a96 @annevk annevk committed Nov 9, 2012
Showing with 50 additions and 46 deletions.
  1. +25 −23 Overview.src.html
  2. +25 −23 dom-core.html
View
48 Overview.src.html
@@ -1471,9 +1471,30 @@ <h2 class=no-num>Goals</h2>
<dt><code>Comment</code>
<dd><p>None.
</dl>
-
<!--AttrExodus -->
+<p>The <dfn title=concept-node-length>length</dfn> of a
+<span title=concept-node>node</span> <var title>node</var> depends on
+<var title>node</var>:
+<dl class=switch>
+ <dt><code>DocumentType</code>
+ <dd><p>Zero.
+
+ <dt><code>Text</code>
+ <dt><code>ProcessingInstruction</code>
+ <dt><code>Comment</code>
+ <dd><p>Its <code title=dom-CharacterData-length>length</code> attribute
+ value.
+
+ <dt>Any other node
+ <dd><p>Its number of <span title=concept-tree-child>children</span>.
+</dl>
+
+<p>A <span title=concept-node>node</span> is considered
+<dfn title=concept-node-empty>empty</dfn> if its
+<span title=concept-node-length>length</span> is zero.
+
+
<h4>Mutation algorithms</h4>
<p>At certain points in the algorithms below it is said that a
@@ -2955,9 +2976,9 @@ <h2 class=no-num>Goals</h2>
<dl class=domintro>
<dt><code><var title>node</var> . <span title=dom-Node-normalize>normalize</span>()</code>
- <dd><p>Removes <code>Text</code> <span title=concept-node>nodes</span>
- whose <span title=concept-CD-data>data</span> is the empty string and
- concatenates the <span title=concept-CD-data>data</span> of remaining
+ <dd><p>Removes <span title=concept-node-empty>empty</span>
+ <code>Text</code> <span title=concept-node>nodes</span> and concatenates
+ the <span title=concept-CD-data>data</span> of remaining
<span>contiguous <code>Text</code> nodes</span> into the first of their
<span title=concept-node>nodes</span>.
</dl>
@@ -5669,7 +5690,6 @@ <h2 class=no-num>Goals</h2>
<h2>Ranges</h2>
-
<!--
TODO
@@ -5680,24 +5700,6 @@ <h2 class=no-num>Goals</h2>
-->
-<!-- only needed by Ranges thus far -->
-<p>The <dfn title=concept-node-length>length</dfn> of a
-<span title=concept-node>node</span> <var title>node</var> depends on
-<var title>node</var>:
-<dl class=switch>
- <dt><code>DocumentType</code>
- <dd><p>0.
-
- <dt><code>Text</code>
- <dt><code>ProcessingInstruction</code>
- <dt><code>Comment</code>
- <dd><p>Its <code title=dom-CharacterData-length>length</code> attribute
- value.
-
- <dt>Any other node
- <dd><p>Its number of <span title=concept-tree-child>children</span>.
-</dl>
-
<h3>Interface <code>Range</code></h3>
<pre class=idl>interface <dfn>Range</dfn> {
readonly attribute <span>Node</span> <span title=dom-Range-startContainer>startContainer</span>;
View
48 dom-core.html
@@ -1536,9 +1536,30 @@ <h3 id="node-tree"><span class="secno">5.2 </span>Node tree</h3>
<dt><code><a href="#comment">Comment</a></code>
<dd><p>None.
</dl>
-
<!--AttrExodus -->
+<p>The <dfn id="concept-node-length" title="concept-node-length">length</dfn> of a
+<a href="#concept-node" title="concept-node">node</a> <var title="">node</var> depends on
+<var title="">node</var>:
+<dl class="switch">
+ <dt><code><a href="#documenttype">DocumentType</a></code>
+ <dd><p>Zero.
+
+ <dt><code><a href="#text">Text</a></code>
+ <dt><code><a href="#processinginstruction">ProcessingInstruction</a></code>
+ <dt><code><a href="#comment">Comment</a></code>
+ <dd><p>Its <code title="dom-CharacterData-length"><a href="#dom-characterdata-length">length</a></code> attribute
+ value.
+
+ <dt>Any other node
+ <dd><p>Its number of <a href="#concept-tree-child" title="concept-tree-child">children</a>.
+</dl>
+
+<p>A <a href="#concept-node" title="concept-node">node</a> is considered
+<dfn id="concept-node-empty" title="concept-node-empty">empty</dfn> if its
+<a href="#concept-node-length" title="concept-node-length">length</a> is zero.
+
+
<h4 id="mutation-algorithms"><span class="secno">5.2.1 </span>Mutation algorithms</h4>
<p>At certain points in the algorithms below it is said that a
@@ -3018,9 +3039,9 @@ <h3 id="interface-node"><span class="secno">5.4 </span>Interface <code><a href="
<dl class="domintro">
<dt><code><var title="">node</var> . <a href="#dom-node-normalize" title="dom-Node-normalize">normalize</a>()</code>
- <dd><p>Removes <code><a href="#text">Text</a></code> <a href="#concept-node" title="concept-node">nodes</a>
- whose <a href="#concept-cd-data" title="concept-CD-data">data</a> is the empty string and
- concatenates the <a href="#concept-cd-data" title="concept-CD-data">data</a> of remaining
+ <dd><p>Removes <a href="#concept-node-empty" title="concept-node-empty">empty</a>
+ <code><a href="#text">Text</a></code> <a href="#concept-node" title="concept-node">nodes</a> and concatenates
+ the <a href="#concept-cd-data" title="concept-CD-data">data</a> of remaining
<a href="#contiguous-text-nodes">contiguous <code>Text</code> nodes</a> into the first of their
<a href="#concept-node" title="concept-node">nodes</a>.
</dl>
@@ -5719,7 +5740,6 @@ <h3 id="interface-comment"><span class="secno">5.12 </span>Interface <code><a hr
<h2 id="ranges"><span class="secno">6 </span>Ranges</h2>
-
<!--
TODO
@@ -5730,24 +5750,6 @@ <h2 id="ranges"><span class="secno">6 </span>Ranges</h2>
-->
-<!-- only needed by Ranges thus far -->
-<p>The <dfn id="concept-node-length" title="concept-node-length">length</dfn> of a
-<a href="#concept-node" title="concept-node">node</a> <var title="">node</var> depends on
-<var title="">node</var>:
-<dl class="switch">
- <dt><code><a href="#documenttype">DocumentType</a></code>
- <dd><p>0.
-
- <dt><code><a href="#text">Text</a></code>
- <dt><code><a href="#processinginstruction">ProcessingInstruction</a></code>
- <dt><code><a href="#comment">Comment</a></code>
- <dd><p>Its <code title="dom-CharacterData-length"><a href="#dom-characterdata-length">length</a></code> attribute
- value.
-
- <dt>Any other node
- <dd><p>Its number of <a href="#concept-tree-child" title="concept-tree-child">children</a>.
-</dl>
-
<h3 id="interface-range"><span class="secno">6.1 </span>Interface <code><a href="#range">Range</a></code></h3>
<pre class="idl">interface <dfn id="range">Range</dfn> {
readonly attribute <a href="#node">Node</a> <a href="#dom-range-startcontainer" title="dom-Range-startContainer">startContainer</a>;

0 comments on commit 5b1920e

Please sign in to comment.