[html5] r933 - /

whatwg at whatwg.org whatwg at whatwg.org
Tue Jun 19 17:31:24 PDT 2007


Author: ianh
Date: 2007-06-19 17:31:23 -0700 (Tue, 19 Jun 2007)
New Revision: 933

Modified:
   index
   source
Log:
[e] (0) Fix a cross-reference to innerHTML-XML. Change the parser's references to the innerHTML setter to instead reference the HTML fragment parsing algorithm. Clarify that the fragment serialising algorithm serialises the contents of the node, not the node itself. Split out the first step of the fragment parsing algorithm into a note before the steps, and two steps at the start. Rephrase the algorithm so it doesn't say MUST anymore (since it's an abstracted out algorithm, the must is used in the invocation of the algorithm now). Add a note that the reset-insertion-mode algorithm will refer to the context node.

Modified: index
===================================================================
--- index	2007-06-20 00:06:56 UTC (rev 932)
+++ index	2007-06-20 00:31:23 UTC (rev 933)
@@ -3911,8 +3911,8 @@
 
    <li>
     <p>The user agent must <span>feed the parser</span> just created the
-     string being assigned into the <code title=dom-innerHTML-HTML><a
-     href="#innerhtml0">innerHTML</a></code> attribute.</p>
+     string being assigned into the <code title=dom-innerHTML-XML><a
+     href="#innerhtml1">innerHTML</a></code> attribute.</p>
 
    <li>
     <p>If the <code title=dom-innerHTML-XML><a
@@ -35449,11 +35449,10 @@
    <a href="#the-root1" title="the root element phase">last phase</a> before
    switching to <em>this</em> phase (or, in the <a
    href="#innerhtml2"><code>innerHTML</code> case</a>, the <code><a
-   href="#html">html</a></code> element created to represent the element
-   whose <code title=dom-innerHTML-HTML><a
-   href="#innerhtml0">innerHTML</a></code> attribute is being set). That's
-   the topmost node of the stack. It never gets popped off the stack. (This
-   stack grows downwards.)
+   href="#html">html</a></code> element created as part of <a
+   href="#html-fragment0" title="html fragment parsing algorithm">that
+   algorithm</a>). That's the topmost node of the stack. It never gets popped
+   off the stack. (This stack grows downwards.)
 
   <p>The <dfn id=current4>current node</dfn> is the bottommost node in this
    stack.
@@ -35790,14 +35789,12 @@
     href="#stack">stack of open elements</a>.
 
    <li>If <var title="">node</var> is the first node in the stack of open
-    elements, then set <var title="">last</var> to true. If the element whose
-    <code title=dom-innerHTML-HTML><a href="#innerhtml0">innerHTML</a></code>
-    attribute is being set is neither a <code><a href="#td">td</a></code>
-    element nor a <code><a href="#th">th</a></code> element, then set <var
-    title="">node</var> to the element whose <code
-    title=dom-innerHTML-HTML><a href="#innerhtml0">innerHTML</a></code>
-    attribute is being set. (<a href="#innerhtml2"><code>innerHTML</code>
-    case</a>)
+    elements, then set <var title="">last</var> to true. If the <var
+    title="">context</var> element of the <span>HTML fragment parsing
+    algorithm is neither a <code><a href="#td">td</a></code> element nor a
+    <code><a href="#th">th</a></code> element, then set <var
+    title="">node</var> to the <var title="">context</var> element. (<a
+    href="#innerhtml2"><code>innerHTML</code> case</a>)</span>
 
    <li>If <var title="">node</var> is a <code>select</code> element, then
     switch the <a href="#insertion0">insertion mode</a> to "<a
@@ -38406,6 +38403,9 @@
    title="">the node</var>, and either returns a string or raises an
    exception.
 
+  <p class=note>This algorithm serialises the <em>children</em> of the node
+   being serialised, not the node itself.
+
   <ol>
    <li>
     <p>Let <var title="">s</var> be a string, and initialise it to the empty
@@ -38569,27 +38569,27 @@
    gives the context for the parser, as well as <var title="">input</var>, a
    string to parse, and returns a list of zero or more nodes.
 
+  <p class=note>Parts marked <dfn id=innerhtml2 title="innerHTML
+   case"><code>innerHTML</code> case</dfn> in algorithms in the parser
+   section are parts that only occur if the parser was created for the
+   purposes of this algorithm. The algorithms have been annotated with such
+   markings for informational purposes only; such markings have no normative
+   weight. If it is possible for a condition described as an <a
+   href="#innerhtml2"><code>innerHTML</code> case</a> to occur even when the
+   parser wasn't created for the purposes of handling this algorithm, then
+   that is an error in the specification.
+
   <ol>
    <li>
-    <p>The user agent must create a new <code>Document</code> node, and mark
-     it as being an <a href="#html-" title="HTML documents">HTML
-     document</a>.</p>
+    <p>Create a new <code>Document</code> node, and mark it as being an <a
+     href="#html-" title="HTML documents">HTML document</a>.</p>
 
-    <p>The user agent must create a new <a href="#html-0">HTML parser</a>,
-     and associate it with the just created <code>Document</code> node.</p>
+   <li>
+    <p>Create a new <a href="#html-0">HTML parser</a>, and associate it with
+     the just created <code>Document</code> node.</p>
 
-    <p class=note>Parts marked <dfn id=innerhtml2 title="innerHTML
-     case"><code>innerHTML</code> case</dfn> in algorithms in the parser
-     section are parts that only occur if the parser was created for the
-     purposes of this algorithm. The algorithms have been annotated with such
-     markings for informational purposes only; such markings have no
-     normative weight. If it is possible for a condition described as an <a
-     href="#innerhtml2"><code>innerHTML</code> case</a> to occur even when
-     the parser wasn't created for the purposes of handling this algorithm,
-     then that is an error in the specification.</p>
-
    <li>
-    <p>The user agent must set the <a href="#html-0">HTML parser</a>'s <a
+    <p>Set the <a href="#html-0">HTML parser</a>'s <a
      href="#tokenisation0">tokenisation</a> stage's <a
      href="#content2">content model flag</a> according to the <var
      title="">context</var> element, as follows:</p>
@@ -38627,7 +38627,7 @@
     </dl>
 
    <li>
-    <p>The user agent must switch the <a href="#html-0">HTML parser</a>'s <a
+    <p>Switch the <a href="#html-0">HTML parser</a>'s <a
      href="#tree-construction0">tree construction</a> stage to <a
      href="#the-main0">the main phase</a>.
 
@@ -38636,38 +38636,39 @@
      href="#html">html</a></code> element with no attributes.</p>
 
    <li>
-    <p>The user agent must append the element <var title="">root</var> to the
+    <p>Append the element <var title="">root</var> to the
      <code>Document</code> node created above.</p>
 
    <li>
-    <p>The user agent must set up the parser's <a href="#stack">stack of open
-     elements</a> so that it contains just the single element <var
-     title="">root</var>.</p>
+    <p>Set up the parser's <a href="#stack">stack of open elements</a> so
+     that it contains just the single element <var title="">root</var>.</p>
 
    <li>
-    <p>The user agent must <a href="#reset" title="reset the insertion mode
-     appropriately">reset the parser's insertion mode appropriately</a>.</p>
+    <p><a href="#reset" title="reset the insertion mode appropriately">Reset
+     the parser's insertion mode appropriately</a>.</p>
 
+    <p class=note>The parser will reference the <var title="">context</var>
+     node as part of that algorithm.</p>
+
    <li>
-    <p>The user agent must set the parser's <a
-     href="#form-element"><code>form</code> element pointer</a> to the
-     nearest node to the <var title="">context</var> that is a
-     <code>form</code> element (going straight up the ancestor chain, and
-     including the element itself, if it is a <code>form</code> element), or,
-     if there is no such <code>form</code> element, to null.</p>
+    <p>Set the parser's <a href="#form-element"><code>form</code> element
+     pointer</a> to the nearest node to the <var title="">context</var> that
+     is a <code>form</code> element (going straight up the ancestor chain,
+     and including the element itself, if it is a <code>form</code> element),
+     or, if there is no such <code>form</code> element, to null.</p>
 
    <li>
-    <p>The user agent must place into the <a href="#input0">input stream</a>
-     for the <a href="#html-0">HTML parser</a> just created the <var
+    <p>Place into the <a href="#input0">input stream</a> for the <a
+     href="#html-0">HTML parser</a> just created the <var
      title="">input</var>.</p>
 
    <li>
-    <p>The user agent must start the parser and let it run until it has
-     consumed all the characters just inserted into the input stream.</p>
+    <p>Start the parser and let it run until it has consumed all the
+     characters just inserted into the input stream.</p>
 
    <li>
-    <p>The user agent must return all the child nodes of <var
-     title="">root</var>, preserving the document order.</p>
+    <p>Return all the child nodes of <var title="">root</var>, preserving the
+     document order.</p>
   </ol>
 
   <h3 id=entities><span class=secno>8.6. </span><dfn

Modified: source
===================================================================
--- source	2007-06-20 00:06:56 UTC (rev 932)
+++ source	2007-06-20 00:31:23 UTC (rev 933)
@@ -2520,7 +2520,7 @@
 
     <p>The user agent must <span>feed the parser</span> just created
     the string being assigned into the <code
-    title="dom-innerHTML-HTML">innerHTML</code> attribute.</p>
+    title="dom-innerHTML-XML">innerHTML</code> attribute.</p>
 
    </li>
 
@@ -32649,10 +32649,10 @@
   <code>html</code> root element node created in the <span title="the
   root element phase">last phase</span> before switching to
   <em>this</em> phase (or, in the <span><code>innerHTML</code>
-  case</span>, the <code>html</code> element created to represent the
-  element whose <code title="dom-innerHTML-HTML">innerHTML</code>
-  attribute is being set). That's the topmost node of the stack. It
-  never gets popped off the stack. (This stack grows downwards.)</p>
+  case</span>, the <code>html</code> element created as part of <span
+  title="html fragment parsing algorithm">that
+  algorithm</span>). That's the topmost node of the stack. It never
+  gets popped off the stack. (This stack grows downwards.)</p>
 
   <p>The <dfn>current node</dfn> is the bottommost node in this
   stack.</p>
@@ -32967,11 +32967,10 @@
 
    <li>If <var title="">node</var> is the first node in the stack of
    open elements, then set <var title="">last</var> to true. If the
-   element whose <code title="dom-innerHTML-HTML">innerHTML</code>
-   attribute is being set is neither a <code>td</code> element nor a
+   <var title="">context</var> element of the <span>HTML fragment
+   parsing algorithm</var> is neither a <code>td</code> element nor a
    <code>th</code> element, then set <var title="">node</var> to the
-   element whose <code title="dom-innerHTML-HTML">innerHTML</code>
-   attribute is being set. (<span><code>innerHTML</code>
+   <var title="">context</var> element. (<span><code>innerHTML</code>
    case</span>)</li>
 
    <li>If <var title="">node</var> is a <code>select</code> element,
@@ -35748,6 +35747,9 @@
   title="">the node</var>, and either returns a string or raises an
   exception.</p>
 
+  <p class="note">This algorithm serialises the <em>children</em> of
+  the node being serialised, not the node itself.</p>
+
   <ol>
 
    <li><p>Let <var title="">s</var> be a string, and initialise it to
@@ -35932,36 +35934,37 @@
   title="">input</var>, a string to parse, and returns a list of zero
   or more nodes.</p>
 
+  <p class="note">Parts marked <dfn title="innerHTML
+  case"><code>innerHTML</code> case</dfn> in algorithms in the parser
+  section are parts that only occur if the parser was created for the
+  purposes of this algorithm. The algorithms have been annotated with
+  such markings for informational purposes only; such markings have no
+  normative weight. If it is possible for a condition described as an
+  <span><code>innerHTML</code> case</span> to occur even when the
+  parser wasn't created for the purposes of handling this algorithm,
+  then that is an error in the specification.</p>
+
   <ol>
 
    <li>
 
-    <p>The user agent must create a new <code>Document</code> node,
-    and mark it as being an <span title="HTML documents">HTML
-    document</span>.</p>
+    <p>Create a new <code>Document</code> node, and mark it as being
+    an <span title="HTML documents">HTML document</span>.</p>
 
-    <p>The user agent must create a new <span>HTML parser</span>, and
-    associate it with the just created <code>Document</code> node.</p>
+   </li>
 
-    <p class="note">Parts marked <dfn title="innerHTML
-    case"><code>innerHTML</code> case</dfn> in algorithms in the
-    parser section are parts that only occur if the parser was created
-    for the purposes of this algorithm. The algorithms have been
-    annotated with such markings for informational purposes only; such
-    markings have no normative weight. If it is possible for a
-    condition described as an <span><code>innerHTML</code> case</span>
-    to occur even when the parser wasn't created for the purposes of
-    handling this algorithm, then that is an error in the
-    specification.</p>
+   <li>
 
+    <p>Create a new <span>HTML parser</span>, and associate it with
+    the just created <code>Document</code> node.</p>
+
    </li>
 
    <li>
 
-    <p>The user agent must set the <span>HTML parser</span>'s
-    <span>tokenisation</span> stage's <span>content model flag</span>
-    according to the <var title="">context</var> element, as
-    follows:</p>
+    <p>Set the <span>HTML parser</span>'s <span>tokenisation</span>
+    stage's <span>content model flag</span> according to the <var
+    title="">context</var> element, as follows:</p>
 
     <dl class="switch">
 
@@ -36002,9 +36005,8 @@
 
    <li>
 
-    <p>The user agent must switch the <span>HTML parser</span>'s
-    <span>tree construction</span> stage to <span>the main
-    phase</span>.
+    <p>Switch the <span>HTML parser</span>'s <span>tree
+    construction</span> stage to <span>the main phase</span>.
 
    </li>
 
@@ -36017,58 +36019,57 @@
 
    <li>
 
-    <p>The user agent must append the element <var title="">root</var>
-    to the <code>Document</code> node created above.</p>
+    <p>Append the element <var title="">root</var> to the
+    <code>Document</code> node created above.</p>
 
    </li>
 
    <li>
 
-    <p>The user agent must set up the parser's <span>stack of open
-    elements</span> so that it contains just the single element <var
-    title="">root</var>.</p>
+    <p>Set up the parser's <span>stack of open elements</span> so that
+    it contains just the single element <var title="">root</var>.</p>
 
    </li>
 
    <li>
 
-    <p>The user agent must <span title="reset the insertion mode
-    appropriately">reset the parser's insertion mode
-    appropriately</span>.</p>
+    <p><span title="reset the insertion mode appropriately">Reset the
+    parser's insertion mode appropriately</span>.</p>
 
+    <p class="note">The parser will reference the <var
+    title="">context</var> node as part of that algorithm.</p>
+
    </li>
 
    <li>
 
-    <p>The user agent must set the parser's <span><code>form</code>
-    element pointer</span> to the nearest node to the <var
-    title="">context</var> that is a <code>form</code> element (going
-    straight up the ancestor chain, and including the element itself,
-    if it is a <code>form</code> element), or, if there is no such
-    <code>form</code> element, to null.</p>
+    <p>Set the parser's <span><code>form</code> element pointer</span>
+    to the nearest node to the <var title="">context</var> that is a
+    <code>form</code> element (going straight up the ancestor chain,
+    and including the element itself, if it is a <code>form</code>
+    element), or, if there is no such <code>form</code> element, to
+    null.</p>
 
    </li>
 
    <li>
 
-    <p>The user agent must place into the <span>input stream</span>
-    for the <span>HTML parser</span> just created the <var
-    title="">input</var>.</p>
+    <p>Place into the <span>input stream</span> for the <span>HTML
+    parser</span> just created the <var title="">input</var>.</p>
 
    </li>
 
    <li>
 
-    <p>The user agent must start the parser and let it run until it
-    has consumed all the characters just inserted into the input
-    stream.</p>
+    <p>Start the parser and let it run until it has consumed all the
+    characters just inserted into the input stream.</p>
 
    </li>
 
    <li>
 
-    <p>The user agent must return all the child nodes of <var
-    title="">root</var>, preserving the document order.</p>
+    <p>Return all the child nodes of <var title="">root</var>,
+    preserving the document order.</p>
 
    </li>
 




More information about the Commit-Watchers mailing list