[html5] r2157 - [] (0) WF2: Defining form=, .form, and the form element pointer. Also, s/initial [...]

whatwg at whatwg.org whatwg at whatwg.org
Sun Sep 7 04:15:29 PDT 2008


Author: ianh
Date: 2008-09-07 04:15:27 -0700 (Sun, 07 Sep 2008)
New Revision: 2157

Modified:
   index
   source
Log:
[] (0) WF2: Defining form=, .form, and the form element pointer. Also, s/initialise/initialize/.

Modified: index
===================================================================
--- index	2008-09-07 09:49:30 UTC (rev 2156)
+++ index	2008-09-07 11:15:27 UTC (rev 2157)
@@ -6313,7 +6313,7 @@
      available.
 
    <li>
-    <p>Initialise <var title="">pos</var> to 0.
+    <p>Initialize <var title="">pos</var> to 0.
 
    <li>
     <p>If <span><var title="">s</var>[0]</span> is 0xEF, <span><var
@@ -26566,6 +26566,8 @@
 
    <dd><a href="#flow-content0">Flow content</a>.
 
+   <dd><a href="#form-associated">Form-associated element</a>.
+
    <dt>Contexts in which this element may be used:
 
    <dd>Where <a href="#flow-content0">flow content</a> is expected.
@@ -26578,7 +26580,7 @@
 
    <dd><code title=attr-fieldset-disabled>disabled</code>
 
-   <dd><code title=attr-fieldset-form>form</code>
+   <dd><code title=attr-fae-form><a href="#form0">form</a></code>
 
    <dt>DOM interface:
 
@@ -26586,7 +26588,7 @@
     <pre
      class=idl>interface <dfn id=htmlfieldsetelement>HTMLFieldSetElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute DOMString <span title=dom-fieldset-disabled>disabled</span>;
-  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fieldset-form>form</span>;
+  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fae-form>form</span>;
 
   readonly attribute DOMString <span title=dom-select-type>type</span>;
 
@@ -26612,6 +26614,8 @@
 
    <dd><a href="#interactive1">Interactive content</a>.
 
+   <dd><a href="#form-associated">Form-associated element</a>.
+
    <dt>Contexts in which this element may be used:
 
    <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
@@ -26638,7 +26642,7 @@
 
    <dd><code title=attr-input-enctype>enctype</code>
 
-   <dd><code title=attr-input-form>form</code>
+   <dd><code title=attr-fae-form><a href="#form0">form</a></code>
 
    <dd><code title=attr-input-inputmode>inputmode</code>
 
@@ -26686,7 +26690,7 @@
            attribute boolean <span title=dom-input-checked>checked</span>;
            attribute boolean <span title=dom-input-disabled>disabled</span>;
            attribute DOMString <span title=dom-input-enctype>enctype</span>;
-  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-input-form>form</span>;
+  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fae-form>form</span>;
            attribute DOMString <span title=dom-input-inputmode>inputmode</span>;
   readonly attribute <a href="#htmlelement">HTMLElement</a> <span title=dom-input-list>list</span>;
            attribute DOMString <span title=dom-input-max>max</span>;
@@ -26737,6 +26741,8 @@
 
    <dd><a href="#interactive1">Interactive content</a>.
 
+   <dd><a href="#form-associated">Form-associated element</a>.
+
    <dt>Contexts in which this element may be used:
 
    <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
@@ -26755,7 +26761,7 @@
 
    <dd><code title=attr-button-enctype>enctype</code>
 
-   <dd><code title=attr-button-form>form</code>
+   <dd><code title=attr-fae-form><a href="#form0">form</a></code>
 
    <dd><code title=attr-button-method>method</code>
 
@@ -26776,7 +26782,7 @@
            attribute boolean <span title=dom-button-autofocus>autofocus</span>;
            attribute boolean <span title=dom-button-disabled>disabled</span>;
            attribute DOMString <span title=dom-button-enctype>enctype</span>;
-  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-button-form>form</span>;
+  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fae-form>form</span>;
            attribute DOMString <span title=dom-button-method>method</span>;
            attribute DOMString <span title=dom-button-name>name</span>;
            attribute DOMString <span title=dom-button-target>target</span>;
@@ -26805,6 +26811,8 @@
 
    <dd><a href="#interactive1">Interactive content</a>.
 
+   <dd><a href="#form-associated">Form-associated element</a>.
+
    <dt>Contexts in which this element may be used:
 
    <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
@@ -26815,7 +26823,7 @@
 
    <dt>Element-specific attributes:
 
-   <dd><code title=attr-label-form>form</code>
+   <dd><code title=attr-fae-form><a href="#form0">form</a></code>
 
    <dd><code title=attr-label-for>for</code>
 
@@ -26824,7 +26832,7 @@
    <dd>
     <pre
      class=idl>interface <dfn id=htmllabelelement>HTMLLabelElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
-  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-label-form>form</span>;
+  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fae-form>form</span>;
            attribute DOMString <span title=dom-label-htmlFor>htmlFor</span>;
   readonly attribute <a href="#htmlelement">HTMLElement</a> <span title=dom-label-control>control</span>;
 };</pre>
@@ -26842,6 +26850,8 @@
 
    <dd><a href="#interactive1">Interactive content</a>.
 
+   <dd><a href="#form-associated">Form-associated element</a>.
+
    <dt>Contexts in which this element may be used:
 
    <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
@@ -26857,7 +26867,7 @@
 
    <dd><code title=attr-select-disabled>disabled</code>
 
-   <dd><code title=attr-select-form>form</code>
+   <dd><code title=attr-fae-form><a href="#form0">form</a></code>
 
    <dd><code title=attr-select-multiple>multiple</code>
 
@@ -26872,7 +26882,7 @@
      class=idl>interface <dfn id=htmlselectelement>HTMLSelectElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute boolean <span title=dom-select-autofocus>autofocus</span>;
            attribute boolean <span title=dom-select-disabled>disabled</span>;
-  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-select-form>form</span>;
+  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fae-form>form</span>;
            attribute boolean <span title=dom-select-multiple>multiple</span>;
            attribute DOMString <span title=dom-select-name>name</span>;
            attribute boolean <span title=dom-select-size>size</span>;
@@ -27043,6 +27053,8 @@
 
    <dd><a href="#interactive1">Interactive content</a>.
 
+   <dd><a href="#form-associated">Form-associated element</a>.
+
    <dt>Contexts in which this element may be used:
 
    <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
@@ -27061,7 +27073,7 @@
 
    <dd><code title=attr-textarea-disabled>disabled</code>
 
-   <dd><code title=attr-textarea-form>form</code>
+   <dd><code title=attr-fae-form><a href="#form0">form</a></code>
 
    <dd><code title=attr-textarea-inputmode>inputmode</code>
 
@@ -27088,7 +27100,7 @@
            attribute boolean <span title=dom-textarea-autofocus>autofocus</span>;
            attribute unsigned long <span title=dom-textarea-cols>cols</span>;
            attribute boolean <span title=dom-textarea-disabled>disabled</span>;
-  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-textarea-form>form</span>;
+  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fae-form>form</span>;
            attribute DOMString <span title=dom-textarea-inputmode>inputmode</span>;
            attribute long <span title=dom-textarea-maxLength>maxLength</span>;
            attribute DOMString <span title=dom-textarea-name>name</span>;
@@ -27126,6 +27138,8 @@
 
    <dd><a href="#phrasing0">Phrasing content</a>.
 
+   <dd><a href="#form-associated">Form-associated element</a>.
+
    <dt>Contexts in which this element may be used:
 
    <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
@@ -27138,7 +27152,7 @@
 
    <dd><code title=attr-output-for>for</code>
 
-   <dd><code title=attr-output-form>form</code>
+   <dd><code title=attr-fae-form><a href="#form0">form</a></code>
 
    <dd><code title=attr-output-name>name</code>
 
@@ -27148,7 +27162,7 @@
     <pre
      class=idl>interface <dfn id=htmloutputelement>HTMLOutputElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute DOMString <span title=dom-output-wrap>htmlFor</span>;
-  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-output-form>form</span>;
+  readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <span title=dom-fae-form>form</span>;
            attribute DOMString <span title=dom-output-name>name</span>;
 
   readonly attribute DOMString <span title=dom-output-type>type</span>;
@@ -27167,10 +27181,102 @@
 
   <h4 id=association><span class=secno>4.9.12 </span>Association of controls
    and forms</h4>
+  <!-- XXX consider xreffing the 'ID' term in this section -->
 
-  <p class=big-issue>When an element is <dfn id=associated
-   title=concept-form-association>associated with a form</dfn>, ...
+  <p>A <dfn id=form-associated>form-associated element</dfn> is one that can
+   have a relationship with a <code><a href="#form">form</a></code> element,
+   which is called the element's <dfn id=form-owner>form owner</dfn>.
 
+  <p>A <a href="#form-associated">form-associated element</a> is, by default,
+   associated with its nearest ancestor <code><a href="#form">form</a></code>
+   element (as described below), but may have a <dfn id=form0
+   title=attr-fae-form><code>form</code></dfn> attribute specified to
+   override this.
+
+  <p>If a <a href="#form-associated">form-associated element</a> has a <code
+   title=attr-fae-form><a href="#form0">form</a></code> attribute specified,
+   then its value must be the ID of a <code><a href="#form">form</a></code>
+   element in the element's owner <code>Document</code>.
+
+  <p>When a <a href="#form-associated">form-associated element</a> is
+   created, its <a href="#form-owner">form owner</a> must be initialized to
+   null (no owner).
+
+  <p>When a <a href="#form-associated">form-associated element</a> is to be
+   <dfn id=associated title=concept-form-association>associated</dfn> with a
+   form, its <a href="#form-owner">form owner</a> must be set to that form.
+
+  <p>When a <a href="#form-associated">form-associated element</a>'s ancestor
+   chain changes, e.g. because it or one of its ancestors was inserted or
+   removed from a <code>Document</code>, then the user agent must <a
+   href="#reset">reset the form owner</a> of that element.
+
+  <p>When a <a href="#form-associated">form-associated element</a>'s <code
+   title=attr-fae-form><a href="#form0">form</a></code> attribute is added,
+   removed, or has its value changed, then the user agent must <a
+   href="#reset">reset the form owner</a> of that element.
+
+  <p>When a <a href="#form-associated">form-associated element</a> has a
+   <code title=attr-fae-form><a href="#form0">form</a></code> attribute and
+   the ID of any of the <code><a href="#form">form</a></code> elements in the
+   <code>Document</code> changes, then the user agent must <a
+   href="#reset">reset the form owner</a> of that <a
+   href="#form-associated">form-associated element</a>.
+
+  <p>When the user agent is to <dfn id=reset>reset the form owner</dfn> of a
+   <a href="#form-associated">form-associated element</a>, it must run the
+   following steps:
+
+  <ol>
+   <li>
+    <p>If the element's <a href="#form-owner">form owner</a> is not null, and
+     the element's <code title=attr-fae-form><a href="#form0">form</a></code>
+     content attribute is not present, and the element's <a
+     href="#form-owner">form owner</a> is one of the ancestors of the element
+     after the change to the ancestor chain, then do nothing, and abort these
+     steps.
+
+   <li>
+    <p>Let the element's <a href="#form-owner">form owner</a> be null.
+
+   <li>
+    <p>If the element has a <code title=attr-fae-form><a
+     href="#form0">form</a></code> content attribute, then run these
+     substeps:</p>
+
+    <ol><!-- XXX how does ID matching get affected by quirks mode? -->
+
+     <li>
+      <p>If the first element in the <code>Document</code> to have an ID that
+       is equal to the element's <code title=attr-fae-form><a
+       href="#form0">form</a></code> content attribute's value is a <code><a
+       href="#form">form</a></code> element, then <a href="#associated"
+       title=concept-form-association>associate</a> the <a
+       href="#form-associated">form-associated element</a> with that <code><a
+       href="#form">form</a></code> element.
+
+     <li>
+      <p>Abort the "reset the form owner" steps.
+    </ol>
+
+   <li>
+    <p>Otherwise, if the <a href="#form-associated">form-associated
+     element</a> in question has an ancestor <code><a
+     href="#form">form</a></code> element, then <a href="#associated"
+     title=concept-form-association>associate</a> the <a
+     href="#form-associated">form-associated element</a> with the nearest
+     such ancestor <code><a href="#form">form</a></code> element.
+
+   <li>
+    <p>Otherwise, the element is left unassociated.
+  </ol>
+
+  <p><a href="#form-associated" title="form-associated
+   element">Form-associated elements</a> have a <dfn id=form1
+   title=dom-foa-form><code>form</code></dfn> DOM attribute, which, on
+   getting, must return the element's <a href="#form-owner">form owner</a>,
+   or null if there isn't one.
+
   <h4 id=processing1><span class=secno>4.9.13 </span>Processing model</h4>
 
   <p class=big-issue>See <a
@@ -37178,7 +37284,7 @@
    title=dom-PopStateEvent-initPopStateEvent><code>initPopStateEvent()</code></dfn>
    and <dfn id=initpopstateeventns
    title=dom-PopStateEvent-initPopStateEventNS><code>initPopStateEventNS()</code></dfn>
-   methods must initialise the event in a manner analogous to the
+   methods must initialize the event in a manner analogous to the
    similarly-named methods in the DOM3 Events interfaces. <a
    href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
 
@@ -38566,7 +38672,7 @@
    title=dom-StorageEvent-initStorageEvent><code>initStorageEvent()</code></dfn>
    and <dfn id=initstorageeventns
    title=dom-StorageEvent-initStorageEventNS><code>initStorageEventNS()</code></dfn>
-   methods must initialise the event in a manner analogous to the
+   methods must initialize the event in a manner analogous to the
    similarly-named methods in the DOM3 Events interfaces. <a
    href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
 
@@ -41939,7 +42045,7 @@
    title=dom-DragEvent-initDragEvent><code>initDragEvent()</code></dfn> and
    <dfn id=initdrageventns
    title=dom-DragEvent-initDragEventNS><code>initDragEventNS()</code></dfn>
-   methods must initialise the event in a manner analogous to the
+   methods must initialize the event in a manner analogous to the
    similarly-named methods in the DOM3 Events interfaces. <a
    href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
 
@@ -41992,7 +42098,7 @@
 
   <p>The <dfn id=effectallowed
    title=dom-DataTransfer-effectAllowed><code>effectAllowed</code></dfn>
-   attribute is used in the drag-and-drop processing model to initialise the
+   attribute is used in the drag-and-drop processing model to initialize the
    <code title=dom-DataTransfer-dropEffect><a
    href="#dropeffect">dropEffect</a></code> attribute during the <code
    title=event-dragenter><a href="#dragenter">dragenter</a></code> and <code
@@ -43210,7 +43316,7 @@
    title=dom-UndoManagerEvent-initUndoManagerEvent><code>initUndoManagerEvent()</code></dfn>
    and <dfn id=initundomanagereventns><code
    title=dom-UndoManagerEvent-initUndoManagerEventNS>initUndoManagerEventNS()</code></dfn>
-   methods must initialise the event in a manner analogous to the
+   methods must initialize the event in a manner analogous to the
    similarly-named methods in the DOM3 Events interfaces. <a
    href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
 
@@ -43813,7 +43919,7 @@
    title=dom-MessageEvent-initMessageEvent><code>initMessageEvent()</code></dfn>
    and <dfn id=initmessageeventns
    title=dom-MessageEvent-initMessageEventNS><code>initMessageEventNS()</code></dfn>
-   methods must initialise the event in a manner analogous to the
+   methods must initialize the event in a manner analogous to the
    similarly-named methods in the DOM3 Events interfaces. <a
    href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
 
@@ -47695,8 +47801,9 @@
 
   <hr>
 
-  <p>When the steps below require the UA to <dfn id=reset>reset the insertion
-   mode appropriately</dfn>, it means the UA must follow these steps:
+  <p>When the steps below require the UA to <dfn id=reset0>reset the
+   insertion mode appropriately</dfn>, it means the UA must follow these
+   steps:
 
   <ol>
    <li>Let <var title="">last</var> be false.
@@ -47938,7 +48045,7 @@
 
   <ol>
    <li>
-    <p>Initialise <var title="">node</var> to be the <a
+    <p>Initialize <var title="">node</var> to be the <a
      href="#current5">current node</a> (the bottommost node of the stack).
 
    <li>
@@ -47986,7 +48093,7 @@
 
   <ol>
    <li>
-    <p>Initialise <var title="">node</var> to be the <a
+    <p>Initialize <var title="">node</var> to be the <a
      href="#current5">current node</a> (the bottommost node of the stack).
 
    <li>
@@ -51302,11 +51409,12 @@
     <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
-     pointer</a> is not null, then <a href="#associated"
-     title=concept-form-association>associate</a> the newly created <code><a
-     href="#fieldset">fieldset</a></code> element with the <code><a
-     href="#form">form</a></code> element pointed to by the <a
-     href="#form-element"><code title="">form</code> element pointer</a>.</p>
+     pointer</a> is not null and the newly created element doesn't have a
+     <code title=attr-fae-form><a href="#form0">form</a></code> attribute,
+     then <a href="#associated" title=concept-form-association>associate</a>
+     the newly created <code><a href="#fieldset">fieldset</a></code> element
+     with the <code><a href="#form">form</a></code> element pointed to by the
+     <a href="#form-element"><code title="">form</code> element pointer</a>.</p>
    </dd>
    <!-- as normal, but imply </li> when there's another <li> open in weird cases -->
 
@@ -51317,7 +51425,7 @@
 
     <ol>
      <li>
-      <p>Initialise <var title="">node</var> to be the <a
+      <p>Initialize <var title="">node</var> to be the <a
        href="#current5">current node</a> (the bottommost node of the stack).
 
      <li>
@@ -51365,7 +51473,7 @@
 
     <ol>
      <li>
-      <p>Initialise <var title="">node</var> to be the <a
+      <p>Initialize <var title="">node</var> to be the <a
        href="#current5">current node</a> (the bottommost node of the stack).
 
      <li>
@@ -51825,9 +51933,10 @@
     <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
-     pointer</a> is not null, then <a href="#associated"
-     title=concept-form-association>associate</a> the <code><a
-     href="#button">button</a></code> element with the <code><a
+     pointer</a> is not null and the newly created element doesn't have a
+     <code title=attr-fae-form><a href="#form0">form</a></code> attribute,
+     then <a href="#associated" title=concept-form-association>associate</a>
+     the <code><a href="#button">button</a></code> element with the <code><a
      href="#form">form</a></code> element pointed to by the <a
      href="#form-element"><code title="">form</code> element pointer</a>.</p>
 
@@ -51964,10 +52073,11 @@
      set.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
-     pointer</a> is not null, then <a href="#associated"
-     title=concept-form-association>associate</a> the newly created <code><a
-     href="#input0">input</a></code> element with the <code><a
-     href="#form">form</a></code> element pointed to by the <a
+     pointer</a> is not null and the newly created element doesn't have a
+     <code title=attr-fae-form><a href="#form0">form</a></code> attribute,
+     then <a href="#associated" title=concept-form-association>associate</a>
+     the newly created <code><a href="#input0">input</a></code> element with
+     the <code><a href="#form">form</a></code> element pointed to by the <a
      href="#form-element"><code title="">form</code> element pointer</a>.</p>
 
    <dt>A start tag whose tag name is "label"
@@ -51979,10 +52089,11 @@
     <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
-     pointer</a> is not null, then <a href="#associated"
-     title=concept-form-association>associate</a> the newly created <code><a
-     href="#label">label</a></code> element with the <code><a
-     href="#form">form</a></code> element pointed to by the <a
+     pointer</a> is not null and the newly created element doesn't have a
+     <code title=attr-fae-form><a href="#form0">form</a></code> attribute,
+     then <a href="#associated" title=concept-form-association>associate</a>
+     the newly created <code><a href="#label">label</a></code> element with
+     the <code><a href="#form">form</a></code> element pointed to by the <a
      href="#form-element"><code title="">form</code> element pointer</a>.</p>
 
    <dt id=isindex>A start tag whose tag name is "isindex"
@@ -52064,11 +52175,12 @@
      the <a href="#current5">current node</a>.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
-     pointer</a> is not null, then <a href="#associated"
-     title=concept-form-association>associate</a> the newly created <code><a
-     href="#textarea">textarea</a></code> element with the <code><a
-     href="#form">form</a></code> element pointed to by the <a
-     href="#form-element"><code title="">form</code> element pointer</a>.</p>
+     pointer</a> is not null and the newly created element doesn't have a
+     <code title=attr-fae-form><a href="#form0">form</a></code> attribute,
+     then <a href="#associated" title=concept-form-association>associate</a>
+     the newly created <code><a href="#textarea">textarea</a></code> element
+     with the <code><a href="#form">form</a></code> element pointed to by the
+     <a href="#form-element"><code title="">form</code> element pointer</a>.</p>
 
     <p>Switch the tokeniser's <a href="#content4">content model flag</a> to
      the RCDATA state.</p>
@@ -52110,9 +52222,10 @@
     <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
 
     <p>If the <a href="#form-element"><code title="">form</code> element
-     pointer</a> is not null, then <a href="#associated"
-     title=concept-form-association>associate</a> the <code><a
-     href="#select">select</a></code> element with the <code><a
+     pointer</a> is not null and the newly created element doesn't have a
+     <code title=attr-fae-form><a href="#form0">form</a></code> attribute,
+     then <a href="#associated" title=concept-form-association>associate</a>
+     the <code><a href="#select">select</a></code> element with the <code><a
      href="#form">form</a></code> element pointed to by the <a
      href="#form-element"><code title="">form</code> element pointer</a>.</p>
 
@@ -52274,7 +52387,7 @@
 
     <ol>
      <li>
-      <p>Initialise <var title="">node</var> to be the <a
+      <p>Initialize <var title="">node</var> to be the <a
        href="#current5">current node</a> (the bottommost node of the stack).
 
      <li>
@@ -52534,7 +52647,7 @@
     <p>Pop elements from this stack until a <code><a
      href="#table">table</a></code> element has been popped from the stack.</p>
 
-    <p><a href="#reset">Reset the insertion mode appropriately</a>.</p>
+    <p><a href="#reset0">Reset the insertion mode appropriately</a>.</p>
 
    <dt>An end tag whose tag name is one of: "body", "caption", "col",
     "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr"
@@ -53138,7 +53251,7 @@
      until a <code><a href="#select">select</a></code> element has been
      popped from the stack.</p>
 
-    <p><a href="#reset">Reset the insertion mode appropriately</a>.</p>
+    <p><a href="#reset0">Reset the insertion mode appropriately</a>.</p>
 
    <dt>A start tag whose tag name is "select"
 
@@ -53932,7 +54045,7 @@
 
   <ol>
    <li>
-    <p>Let <var title="">s</var> be a string, and initialise it to the empty
+    <p>Let <var title="">s</var> be a string, and initialize it to the empty
      string.
 
    <li>
@@ -54195,7 +54308,7 @@
      that it contains just the single element <var title="">root</var>.</p>
 
    <li>
-    <p><a href="#reset" title="reset the insertion mode appropriately">Reset
+    <p><a href="#reset0" 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>

Modified: source
===================================================================
--- source	2008-09-07 09:49:30 UTC (rev 2156)
+++ source	2008-09-07 11:15:27 UTC (rev 2157)
@@ -4160,7 +4160,7 @@
    algorithm, to wait until the first 512 bytes of the resource are
    available.</p></li>
 
-   <li><p>Initialise <var title="">pos</var> to 0.</p></li>
+   <li><p>Initialize <var title="">pos</var> to 0.</p></li>
 
    <li><p>If <span><var title="">s</var>[0]</span> is 0xEF, <span><var
    title="">s</var>[1]</span> is 0xBB, and <span><var
@@ -23935,18 +23935,19 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Flow content</span>.</dd>
+   <dd><span>Form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>flow content</span> is expected.</dd>
    <dt>Content model:</dt>
    <dd><span>Flow content</span>.</dd>
    <dt>Element-specific attributes:</dt>
    <dd><code title="attr-fieldset-disabled">disabled</code></dd>
-   <dd><code title="attr-fieldset-form">form</code></dd>
+   <dd><code title="attr-fae-form">form</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLFieldSetElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-fieldset-disabled">disabled</span>;
-  readonly attribute <span>HTMLFormElement</span> <span title="dom-fieldset-form">form</span>;
+  readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
 
   readonly attribute DOMString <span title="dom-select-type">type</span>;
 
@@ -23970,6 +23971,7 @@
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dd><span>Interactive content</span>.</dd>
+   <dd><span>Form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>phrasing content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -23983,7 +23985,7 @@
    <dd><code title="attr-input-checked">checked</code></dd>
    <dd><code title="attr-input-disabled">disabled</code></dd>
    <dd><code title="attr-input-enctype">enctype</code></dd>
-   <dd><code title="attr-input-form">form</code></dd>
+   <dd><code title="attr-fae-form">form</code></dd>
    <dd><code title="attr-input-inputmode">inputmode</code></dd>
    <dd><code title="attr-input-list">list</code></dd>
    <dd><code title="attr-input-max">max</code></dd>
@@ -24012,7 +24014,7 @@
            attribute boolean <span title="dom-input-checked">checked</span>;
            attribute boolean <span title="dom-input-disabled">disabled</span>;
            attribute DOMString <span title="dom-input-enctype">enctype</span>;
-  readonly attribute <span>HTMLFormElement</span> <span title="dom-input-form">form</span>;
+  readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute DOMString <span title="dom-input-inputmode">inputmode</span>;
   readonly attribute <span>HTMLElement</span> <span title="dom-input-list">list</span>;
            attribute DOMString <span title="dom-input-max">max</span>;
@@ -24062,6 +24064,7 @@
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dd><span>Interactive content</span>.</dd>
+   <dd><span>Form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>phrasing content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -24071,7 +24074,7 @@
    <dd><code title="attr-button-autofocus">autofocus</code></dd>
    <dd><code title="attr-button-disabled">disabled</code></dd>
    <dd><code title="attr-button-enctype">enctype</code></dd>
-   <dd><code title="attr-button-form">form</code></dd>
+   <dd><code title="attr-fae-form">form</code></dd>
    <dd><code title="attr-button-method">method</code></dd>
    <dd><code title="attr-button-name">name</code></dd>
    <dd><code title="attr-button-target">target</code></dd>
@@ -24084,7 +24087,7 @@
            attribute boolean <span title="dom-button-autofocus">autofocus</span>;
            attribute boolean <span title="dom-button-disabled">disabled</span>;
            attribute DOMString <span title="dom-button-enctype">enctype</span>;
-  readonly attribute <span>HTMLFormElement</span> <span title="dom-button-form">form</span>;
+  readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute DOMString <span title="dom-button-method">method</span>;
            attribute DOMString <span title="dom-button-name">name</span>;
            attribute DOMString <span title="dom-button-target">target</span>;
@@ -24111,17 +24114,18 @@
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dd><span>Interactive content</span>.</dd>
+   <dd><span>Form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>phrasing content</span> is expected.</dd>
    <dt>Content model:</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dt>Element-specific attributes:</dt>
-   <dd><code title="attr-label-form">form</code></dd>
+   <dd><code title="attr-fae-form">form</code></dd>
    <dd><code title="attr-label-for">for</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLLabelElement</dfn> : <span>HTMLElement</span> {
-  readonly attribute <span>HTMLFormElement</span> <span title="dom-label-form">form</span>;
+  readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute DOMString <span title="dom-label-htmlFor">htmlFor</span>;
   readonly attribute <span>HTMLElement</span> <span title="dom-label-control">control</span>;
 };</pre>
@@ -24137,6 +24141,7 @@
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dd><span>Interactive content</span>.</dd>
+   <dd><span>Form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>phrasing content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -24144,7 +24149,7 @@
    <dt>Element-specific attributes:</dt>
    <dd><code title="attr-select-autofocus">autofocus</code></dd>
    <dd><code title="attr-select-disabled">disabled</code></dd>
-   <dd><code title="attr-select-form">form</code></dd>
+   <dd><code title="attr-fae-form">form</code></dd>
    <dd><code title="attr-select-multiple">multiple</code></dd>
    <dd><code title="attr-select-name">name</code></dd>
    <dd><code title="attr-select-size">size</code></dd>
@@ -24153,7 +24158,7 @@
 <pre class="idl">interface <dfn>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
            attribute boolean <span title="dom-select-autofocus">autofocus</span>;
            attribute boolean <span title="dom-select-disabled">disabled</span>;
-  readonly attribute <span>HTMLFormElement</span> <span title="dom-select-form">form</span>;
+  readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute boolean <span title="dom-select-multiple">multiple</span>;
            attribute DOMString <span title="dom-select-name">name</span>;
            attribute boolean <span title="dom-select-size">size</span>;
@@ -24287,6 +24292,7 @@
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dd><span>Interactive content</span>.</dd>
+   <dd><span>Form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>phrasing content</span> is expected.</dd>
    <dt>Content model:</dt>
@@ -24296,7 +24302,7 @@
    <dd><code title="attr-textarea-autofocus">autofocus</code></dd>
    <dd><code title="attr-textarea-cols">cols</code></dd>
    <dd><code title="attr-textarea-disabled">disabled</code></dd>
-   <dd><code title="attr-textarea-form">form</code></dd>
+   <dd><code title="attr-fae-form">form</code></dd>
    <dd><code title="attr-textarea-inputmode">inputmode</code></dd>
    <dd><code title="attr-textarea-maxlength">maxlength</code></dd>
    <dd><code title="attr-textarea-name">name</code></dd>
@@ -24312,7 +24318,7 @@
            attribute boolean <span title="dom-textarea-autofocus">autofocus</span>;
            attribute unsigned long <span title="dom-textarea-cols">cols</span>;
            attribute boolean <span title="dom-textarea-disabled">disabled</span>;
-  readonly attribute <span>HTMLFormElement</span> <span title="dom-textarea-form">form</span>;
+  readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute DOMString <span title="dom-textarea-inputmode">inputmode</span>;
            attribute long <span title="dom-textarea-maxLength">maxLength</span>;
            attribute DOMString <span title="dom-textarea-name">name</span>;
@@ -24350,19 +24356,20 @@
   <dl class="element">
    <dt>Categories</dt>
    <dd><span>Phrasing content</span>.</dd>
+   <dd><span>Form-associated element</span>.</dd>
    <dt>Contexts in which this element may be used:</dt>
    <dd>Where <span>phrasing content</span> is expected.</dd>
    <dt>Content model:</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dt>Element-specific attributes:</dt>
    <dd><code title="attr-output-for">for</code></dd>
-   <dd><code title="attr-output-form">form</code></dd>
+   <dd><code title="attr-fae-form">form</code></dd>
    <dd><code title="attr-output-name">name</code></dd>
    <dt>DOM interface:</dt>
    <dd>
 <pre class="idl">interface <dfn>HTMLOutputElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-output-wrap">htmlFor</span>;
-  readonly attribute <span>HTMLFormElement</span> <span title="dom-output-form">form</span>;
+  readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute DOMString <span title="dom-output-name">name</span>;
 
   readonly attribute DOMString <span title="dom-output-type">type</span>;
@@ -24383,11 +24390,99 @@
 
   <h4>Association of controls and forms</h4>
 
-  <p class="big-issue">When an element is <dfn
-  title="concept-form-association">associated with a form</dfn>,
-  ...</p>
+  <!-- XXX consider xreffing the 'ID' term in this section -->
 
+  <p>A <dfn>form-associated element</dfn> is one that can have a
+  relationship with a <code>form</code> element, which is called the
+  element's <dfn>form owner</dfn>.</p>
 
+  <p>A <span>form-associated element</span> is, by default, associated
+  with its nearest ancestor <code>form</code> element (as described
+  below), but may have a <dfn
+  title="attr-fae-form"><code>form</code></dfn> attribute specified to
+  override this.</p>
+
+  <p>If a <span>form-associated element</span> has a <code
+  title="attr-fae-form">form</code> attribute specified, then its
+  value must be the ID of a <code>form</code> element in the element's
+  owner <code>Document</code>.</p>
+
+  <p>When a <span>form-associated element</span> is created, its
+  <span>form owner</span> must be initialized to null (no owner).</p>
+
+  <p>When a <span>form-associated element</span> is to be <dfn
+  title="concept-form-association">associated</dfn> with a form, its
+  <span>form owner</span> must be set to that form.</p>
+
+  <p>When a <span>form-associated element</span>'s ancestor chain
+  changes, e.g. because it or one of its ancestors was inserted or
+  removed from a <code>Document</code>, then the user agent must
+  <span>reset the form owner</span> of that element.</p>
+
+  <p>When a <span>form-associated element</span>'s <code
+  title="attr-fae-form">form</code> attribute is added, removed, or
+  has its value changed, then the user agent must <span>reset the form
+  owner</span> of that element.</p>
+
+  <p>When a <span>form-associated element</span> has a <code
+  title="attr-fae-form">form</code> attribute and the ID of any of the
+  <code>form</code> elements in the <code>Document</code> changes,
+  then the user agent must <span>reset the form owner</span> of that
+  <span>form-associated element</span>.</p>
+
+  <p>When the user agent is to <dfn>reset the form owner</dfn> of a
+  <span>form-associated element</span>, it must run the following
+  steps:</p>
+
+  <ol>
+
+   <li><p>If the element's <span>form owner</span> is not null, and
+   the element's <code title="attr-fae-form">form</code> content
+   attribute is not present, and the element's <span>form owner</span>
+   is one of the ancestors of the element after the change to the
+   ancestor chain, then do nothing, and abort these steps.</p></li>
+
+   <li><p>Let the element's <span>form owner</span> be null.</p></li>
+
+   <li>
+
+    <p>If the element has a <code title="attr-fae-form">form</code>
+    content attribute, then run these substeps:</p>
+
+    <ol>
+
+     <!-- XXX how does ID matching get affected by quirks mode? -->
+     <li><p>If the first element in the <code>Document</code> to have
+     an ID that is equal to the element's <code
+     title="attr-fae-form">form</code> content attribute's value is a
+     <code>form</code> element, then <span
+     title="concept-form-association">associate</span> the
+     <span>form-associated element</span> with that <code>form</code>
+     element.</p></li>
+
+     <li><p>Abort the "reset the form owner" steps.</p></li>
+
+    </ol>
+
+   </li>
+
+   <li><p>Otherwise, if the <span>form-associated element</span> in
+   question has an ancestor <code>form</code> element, then <span
+   title="concept-form-association">associate</span> the
+   <span>form-associated element</span> with the nearest such ancestor
+   <code>form</code> element.</p></li>
+
+   <li><p>Otherwise, the element is left unassociated.</p></li>
+
+  </ol>
+
+  <p><span title="form-associated element">Form-associated
+  elements</span> have a <dfn
+  title="dom-foa-form"><code>form</code></dfn> DOM attribute, which,
+  on getting, must return the element's <span>form owner</span>, or
+  null if there isn't one.</p>
+
+
   <h4>Processing model</h4>
 
   <p class="big-issue">See <a href="http://www.whatwg.org/specs/web-forms/current-work/#extend-form-controls">WF2</a> for now</p>
@@ -34376,7 +34471,7 @@
   title="dom-PopStateEvent-initPopStateEvent"><code>initPopStateEvent()</code></dfn>
   and <dfn
   title="dom-PopStateEvent-initPopStateEventNS"><code>initPopStateEventNS()</code></dfn>
-  methods must initialise the event in a manner analogous to the
+  methods must initialize the event in a manner analogous to the
   similarly-named methods in the DOM3 Events interfaces. <a
   href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
 
@@ -35774,7 +35869,7 @@
   title="dom-StorageEvent-initStorageEvent"><code>initStorageEvent()</code></dfn>
   and <dfn
   title="dom-StorageEvent-initStorageEventNS"><code>initStorageEventNS()</code></dfn>
-  methods must initialise the event in a manner analogous to the
+  methods must initialize the event in a manner analogous to the
   similarly-named methods in the DOM3 Events interfaces. <a
   href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
 
@@ -39170,7 +39265,7 @@
   title="dom-DragEvent-initDragEvent"><code>initDragEvent()</code></dfn>
   and <dfn
   title="dom-DragEvent-initDragEventNS"><code>initDragEventNS()</code></dfn>
-  methods must initialise the event in a manner analogous to the
+  methods must initialize the event in a manner analogous to the
   similarly-named methods in the DOM3 Events interfaces. <a
   href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
 
@@ -39226,7 +39321,7 @@
   <p>The <dfn
   title="dom-DataTransfer-effectAllowed"><code>effectAllowed</code></dfn>
   attribute is used in the drag-and-drop processing model to
-  initialise the <code
+  initialize the <code
   title="dom-DataTransfer-dropEffect">dropEffect</code> attribute
   during the <code title="event-dragenter">dragenter</code> and <code
   title="event-dragover">dragover</code> events.</p>
@@ -40406,7 +40501,7 @@
   title="dom-UndoManagerEvent-initUndoManagerEvent"><code>initUndoManagerEvent()</code></dfn>
   and <dfn><code
   title="dom-UndoManagerEvent-initUndoManagerEventNS">initUndoManagerEventNS()</code></dfn>
-  methods must initialise the event in a manner analogous to the
+  methods must initialize the event in a manner analogous to the
   similarly-named methods in the DOM3 Events interfaces. <a
   href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
 
@@ -40882,7 +40977,7 @@
   title="dom-MessageEvent-initMessageEvent"><code>initMessageEvent()</code></dfn>
   and <dfn
   title="dom-MessageEvent-initMessageEventNS"><code>initMessageEventNS()</code></dfn>
-  methods must initialise the event in a manner analogous to the
+  methods must initialize the event in a manner analogous to the
   similarly-named methods in the DOM3 Events interfaces. <a
   href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
 
@@ -45071,7 +45166,7 @@
 
   <ol>
 
-   <li><p>Initialise <var title="">node</var> to be the <span>current
+   <li><p>Initialize <var title="">node</var> to be the <span>current
    node</span> (the bottommost node of the stack).</p></li>
 
    <li><p>If <var title="">node</var> is the target node, terminate in
@@ -45108,7 +45203,7 @@
 
   <ol>
 
-   <li><p>Initialise <var title="">node</var> to be the <span>current
+   <li><p>Initialize <var title="">node</var> to be the <span>current
    node</span> (the bottommost node of the stack).</p></li>
 
    <li><p>If <var title="">node</var> is the target node, terminate in
@@ -47926,7 +48021,8 @@
     <p><span>Insert an HTML element</span> for the token.</p>
 
     <p>If the <span><code title="">form</code> element pointer</span>
-    is not null, then <span
+    is not null and the newly created element doesn't have a <code
+    title="attr-fae-form">form</code> attribute, then <span
     title="concept-form-association">associate</span> the newly
     created <code>fieldset</code> element with the <code>form</code>
     element pointed to by the <span><code title="">form</code> element
@@ -47942,7 +48038,7 @@
 
     <ol>
 
-     <li><p>Initialise <var title="">node</var> to be the <span>current
+     <li><p>Initialize <var title="">node</var> to be the <span>current
      node</span> (the bottommost node of the stack).</p></li>
 
      <li><p>If <var title="">node</var> is an <code>li</code> element,
@@ -47990,7 +48086,7 @@
 
     <ol>
 
-     <li><p>Initialise <var title="">node</var> to be the <span>current
+     <li><p>Initialize <var title="">node</var> to be the <span>current
      node</span> (the bottommost node of the stack).</p></li>
 
      <li><p>If <var title="">node</var> is a <code>dd</code> or
@@ -48474,7 +48570,8 @@
     <p><span>Insert an HTML element</span> for the token.</p>
 
     <p>If the <span><code title="">form</code> element pointer</span>
-    is not null, then <span
+    is not null and the newly created element doesn't have a <code
+    title="attr-fae-form">form</code> attribute, then <span
     title="concept-form-association">associate</span> the
     <code>button</code> element with the <code>form</code> element
     pointed to by the <span><code title="">form</code> element
@@ -48621,7 +48718,8 @@
     token's <i>self-closing flag</i></span>, if it is set.</p>
 
     <p>If the <span><code title="">form</code> element pointer</span>
-    is not null, then <span
+    is not null and the newly created element doesn't have a <code
+    title="attr-fae-form">form</code> attribute, then <span
     title="concept-form-association">associate</span> the newly
     created <code>input</code> element with the <code>form</code>
     element pointed to by the <span><code title="">form</code> element
@@ -48638,7 +48736,8 @@
     <p><span>Insert an HTML element</span> for the token.</p>
 
     <p>If the <span><code title="">form</code> element pointer</span>
-    is not null, then <span
+    is not null and the newly created element doesn't have a <code
+    title="attr-fae-form">form</code> attribute, then <span
     title="concept-form-association">associate</span> the newly
     created <code>label</code> element with the <code>form</code>
     element pointed to by the <span><code title="">form</code> element
@@ -48735,7 +48834,8 @@
     node</span>.</p>
 
     <p>If the <span><code title="">form</code> element pointer</span>
-    is not null, then <span
+    is not null and the newly created element doesn't have a <code
+    title="attr-fae-form">form</code> attribute, then <span
     title="concept-form-association">associate</span> the newly
     created <code>textarea</code> element with the <code>form</code>
     element pointed to by the <span><code title="">form</code> element
@@ -48782,7 +48882,8 @@
     <p><span>Insert an HTML element</span> for the token.</p>
 
     <p>If the <span><code title="">form</code> element pointer</span>
-    is not null, then <span
+    is not null and the newly created element doesn't have a <code
+    title="attr-fae-form">form</code> attribute, then <span
     title="concept-form-association">associate</span> the
     <code>select</code> element with the <code>form</code> element
     pointed to by the <span><code title="">form</code> element
@@ -48954,7 +49055,7 @@
 
     <ol>
 
-     <li><p>Initialise <var title="">node</var> to be the <span>current
+     <li><p>Initialize <var title="">node</var> to be the <span>current
      node</span> (the bottommost node of the stack).</p></li>
 
      <li><p>If <var title="">node</var> has the same tag name as
@@ -50684,7 +50785,7 @@
 
   <ol>
 
-   <li><p>Let <var title="">s</var> be a string, and initialise it to
+   <li><p>Let <var title="">s</var> be a string, and initialize it to
    the empty string.</p></li>
 
    <li>




More information about the Commit-Watchers mailing list