HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2322WF2: Form submission encoding algorithms and related fallout. Also, change 'int' to 'long' in IDL blocks.2008-10-11 01:37
@@ -20075,22 +20075,22 @@ interface <dfn>CanvasGradient</dfn> {
 
 interface <dfn>CanvasPattern</dfn> {
   // opaque object
 };
 
 interface <dfn>TextMetrics</dfn> {
   readonly attribute float <span title="dom-textmetrics-width">width</span>;
 };
 
 interface <dfn>ImageData</dfn> {
-  readonly attribute unsigned long int <span title="dom-imagedata-width">width</span>;
-  readonly attribute unsigned long int <span title="dom-imagedata-height">height</span>;
+  readonly attribute unsigned long <span title="dom-imagedata-width">width</span>;
+  readonly attribute unsigned long <span title="dom-imagedata-height">height</span>;
   readonly attribute <span>CanvasPixelArray</span> <span title="dom-imagedata-data">data</span>;
 };
 
 interface <dfn>CanvasPixelArray</dfn> {
   readonly attribute unsigned long <span title="dom-canvaspixelarray-length">length</span>;
   [IndexGetter] <span>octet</span> <span title="dom-canvaspixelarray-XXX5">XXX5</span>(in unsigned long index); <!-- XXX DOMB -->
   [IndexSetter] void <span title="dom-canvaspixelarray-XXX6">XXX6</span>(in unsigned long index, in octet value); <!-- XXX DOMB -->
 };</pre>
 
   <p>The <dfn title="dom-context-2d-canvas"><code>canvas</code></dfn>
@@ -25538,22 +25538,22 @@ function AddCloud(data, x, y) { ... }</pre>
            attribute DOMString <span title="dom-input-src">src</span>;
            attribute DOMString <span title="dom-input-step">step</span>;
            attribute DOMString <span title="dom-fs-target">target</span>;
            attribute DOMString <span title="dom-input-type">type</span>;
            attribute DOMString <span title="dom-input-defaultValue">defaultValue</span>;
            attribute DOMString <span title="dom-input-value">value</span>;
            attribute DOMTimeStamp <span title="dom-input-valueAsDate">valueAsDate</span>;
            attribute float <span title="dom-input-valueAsNumber">valueAsNumber</span>;
   readonly attribute <span>HTMLOptionElement</span> <span title="dom-input-selectedOption">selectedOption</span>;
 
-  void <span title="dom-input-stepUp">stepUp</span>(in int n);
-  void <span title="dom-input-stepDown">stepDown</span>(in int n);
+  void <span title="dom-input-stepUp">stepUp</span>(in long n);
+  void <span title="dom-input-stepDown">stepDown</span>(in long n);
 
   readonly attribute boolean <span title="dom-cva-willValidate">willValidate</span>;
   readonly attribute <span>ValidityState</span> <span title="dom-cva-validity">validity</span>;
   readonly attribute DOMString <span title="dom-cva-validationMessage">validationMessage</span>;
   boolean <span title="dom-cva-checkValidatity">checkValidity</span>();
   void <span title="dom-cva-setCustomValidity">setCustomValidity</span>(in DOMString error);
 
   readonly attribute <span>NodeList</span> <span title="dom-lfe-labels">labels</span>;
 };</pre>
    </dd> 
@@ -31093,21 +31093,21 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
    canceled) then abort these steps. Otherwise, continue (effectively
    the default action is to perform the submission).</p></li>
    <!-- XXX define what happens if .submit() is called during this -->
 
    <li><p>Let <var title="">controls</var> be a list of all the <span
    title="category-submit">submittable</span> elements whose
    <span>form owner</span> is <var title="">form</var>, in <span>tree
    order</span>.</p></li>
 
    <li><p>Let the <var title="">form data set</var> be a list of
-   name/value pairs, initially empty.</p></li>
+   name-value-type tuples, initially empty.</p></li>
 
    <li id="constructing-form-data-set">
 
     <p><strong>Constructing the form data set</strong>. For each
     element <var title="">field</var> in <var title="">controls</var>,
     in <span>tree order</span>, run the following substeps:</p>
 
     <ol>
 
      <li>
@@ -31146,20 +31146,24 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
        title="attr-input-type">type</code> attribute is in the <span
        title="attr-input-type-file">File Upload</span> state but
        the control does not have any files selected.</li>
 
       </ul>
 
       <p>Otherwise, process <var title="">field</var> as follows:</p>
 
      </li>
 
+     <li><p>Let <var title="">type</var> be the value of the <code
+     title="">type</code> DOM attribute of <var
+     title="">field</var>.</p></li>
+
      <li>
 
       <p>If the <var title="">field</var> element is an
       <code>input</code> element whose <code
       title="attr-input-type">type</code> attribute is in the <span
       title="attr-input-type-image">Image Button</span> state,
       then run these further nested substeps:</p>
 
       <ol>
 
@@ -31184,26 +31188,28 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
        title="">submitter</var>, and before this algorithm was invoked
        the user <span
        title="concept-input-type-image-coordinate">indicated a
        coordinate</span>. Let <var title="">x</var> be the <var
        title="">x</var>-component of the coordindate selected by the
        user, and let <var title="">y</var> be the <var
        title="">y</var>-component of the coordinate selected by the
        user.</p></li>
 
        <li><p>Append an entry in the <var title="">form data set</var>
-       with the name <var title="">name<sub title="">x</sub></var> and
-       the value <var title="">x</var>.</p></li>
+       with the name <var title="">name<sub title="">x</sub></var>,
+       the value <var title="">x</var>, and the type <var
+       title="">type</var>.</p></li>
 
        <li><p>Append an entry in the <var title="">form data set</var>
        with the name <var title="">name<sub title="">y</sub></var> and
-       the value <var title="">y</var>.</p></li>
+       the value <var title="">y</var>, and the type <var
+       title="">type</var>.</p></li>
 
        <li><p>Skip the remaining substeps for this element: if there
        are any more elements in <var title="">controls</var>, return
        to the top of the <a
        href="#constructing-form-data-set">constructing the form data
        set</a> step, otherwise, jump to the next step in the overall
        form submission algorithm.</p></li>
 
       </ol>
 
@@ -31220,64 +31226,68 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
      <li><p>Let <var title="">name</var> be the value of the <var
      title="">field</var> element's <code
      title="attr-fe-name">name</code> attribute.</p></li>
 
      <li><p>If the <var title="">field</var> element is a
      <code>select</code> element, then for each <code>option</code>
      element in the <code>select</code> element whose <span
      title="concept-option-selectedness">selectedness</span> is true,
      append an entry in the <var title="">form data set</var> with the
-     <var title="">name</var> as the name and the <span
+     <var title="">name</var> as the name, the <span
      title="concept-option-value">value</span> of the
-     <code>option</code> element as the value.</p></li>
+     <code>option</code> element as the value, and <var
+     title="">type</var> as the type.</p></li>
 
      <li>
 
       <p>Otherwise, if the <var title="">field</var> element is an
       <code>input</code> element whose <code
       title="attr-input-type">type</code> attribute is in the <span
       title="attr-input-type-checkbox">Checkbox</span> state or the
       <span title="attr-input-type-radio">Radio Button</span> state,
       then then run these further nested substeps:</p>
 
       <ol>
 
        <li><p>If the <var title="">field</var> element has a <code
        title="attr-input-value">value</code> attribute specified, then
        let <var title="">value</var> be the value of that attribute;
        otherwise, let <var title="">value</var> be the string
        "<code title="">on</code>".</p></li>
 
        <li><p>Append an entry in the <var title="">form data set</var>
-       with <var title="">name</var> as the name and <var
-       title="">value</var> as the value.</p></li>
+       with <var title="">name</var> as the name, <var
+       title="">value</var> as the value, and <var title="">type</var>
+       as the type.</p></li>
 
       </ol>
 
      </li>
 
      <li><p>Otherwise, if the <var title="">field</var> element is an
      <code>input</code> element whose <code
      title="attr-input-type">type</code> attribute is in the <span
      title="attr-input-type-file">File Upload</span> state, then for
      each file <span
      title="concept-input-type-file-selected">selected</span> in the
      <code>input</code> element, append an entry in the <var
      title="">form data set</var> with the <var title="">name</var> as
-     the name and the file (consisting of the name, the type, and the
-     body) as the value.</p></li>
+     the name, the file (consisting of the name, the type, and the
+     body) as the value, and <var title="">type</var> as the
+     type.</p></li>
 
      <li><p>Otherwise, append an entry in the <var title="">form data
-     set</var> with <var title="">name</var> as the name and the <span
+     set</var> with <var title="">name</var> as the name, the <span
      title="concept-fe-value">value</span> of the <var
-     title="">field</var> element as the value.</p></li>
+     title="">field</var> element as the value, and <var
+     title="">type</var> as the type.</p></li>
 
     </ol>
 
    </li>
 
    <li><p>Let <var title="">action</var> be the <var
    title="">submitter</var> element's <span
    title="concept-fs-action">action</span>.</p></li>
 
    <li><p>If <var title="">action</var> is the empty string, let <var
@@ -31367,24 +31377,24 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
     specification defining this, act in a manner analogous to that
     defined in this specification for similar schemes.</p>
 
     <p>The behaviors are as follows:</p>
 
     <dl>
 
      <dt><dfn title="submit-mutate-action">Mutate action</dfn>
      <dd>
 
-      <p>Let <var title="">query</var> be the resulting encoding the
+      <p>Let <var title="">query</var> be the result of encoding the
       <var title="">form data set</var> using the <span><code
       title="">application/x-www-form-urlencoded</code> encoding
-      algorithm</span>.</p>
+      algorithm</span>, interpreted as a US-ASCII string.</p>
 
       <p>Let <var title="">destination</var> be a new <span>URL</span>
       that is equal to the <var title="">action</var> except that its
       <span title="url-query">&lt;query&gt;</span> component is
       replaced by <var title="">query</var> (adding a U+003F QUESTION
       MARK (?)  character if appropriate).</p>
 
       <p>Let <var title="">target browsing context</var> be <span>the
       form submission target browsing context</span>.</p>
 
@@ -31399,27 +31409,49 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
      <dt><dfn title="submit-body">Submit as entity body</dfn>
      <dd>
 
       <p>Let <var title="">entity body</var> be the result of encoding
       the <var title="">form data set</var> using the
       <span>appropriate form encoding algorithm</span>.</p>
 
       <p>Let <var title="">target browsing context</var> be <span>the
       form submission target browsing context</span>.</p>
 
+      <p>Let <var title="">MIME type</var> be determined as
+      follows:</p>
+
+      <dl>
+
+       <dt>If <var title="">enctype</var> is <code title="attr-fs-enctype-urlencoded">application/x-www-form-urlencoded</code></dt>
+
+       <dd>Let <var title="">MIME type</var> be "<code
+       title="">application/x-www-form-urlencoded</code>".</dd>
+
+       <dt>If <var title="">enctype</var> is <code title="attr-fs-enctype-formdata">multpart/form-data</code></dt>
+
+       <dd>Let <var title="">MIME type</var> be "<code
+       title="">multipart/form-data</code>".</dd>
+
+       <dt>If <var title="">enctype</var> is <code title="attr-fs-enctype-text">text/plain</code></dt>
+
+       <dd>Let <var title="">MIME type</var> be "<code title="">text/plain</code>".</dd>
+
+      </dl>
+
       <p><span>Navigate</span> <var title="">target browsing
       context</var> to <var title="">action</var> using the HTTP
       method given by <var title="">method</var> and with <var
-      title="">entity body</var> as the entity body. If <var
-      title="">target browsing context</var> was newly created for
-      this purpose by the steps above, then it must be navigated with
-      <span>replacement enabled</span>.</p>
+      title="">entity body</var> as the entity body, of type <var
+      title="">MIME type</var>. If <var title="">target browsing
+      context</var> was newly created for this purpose by the steps
+      above, then it must be navigated with <span>replacement
+      enabled</span>.</p>
 
      </dd>
 
      <dt><dfn title="submit-delete-action">Delete action</dfn>
      <dd>
 
       <p>Let <var title="">target browsing context</var> be <span>the
       form submission target browsing context</span>.</p>
 
       <p><span>Navigate</span> <var title="">target browsing
@@ -31446,35 +31478,39 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
      <dt><dfn title="submit-data-post">Post to data:</dfn>
      <dd>
 
       <p>Let <var title="">data</var> be the result of encoding the
       <var title="">form data set</var> using the <span>appropriate
       form encoding algorithm</span>.</p>
 
       <p>If <var title="">action</var> contains the string "<code
       title="">%%%%</code>" (four U+0025 PERCENT SIGN characters),
-      then %-escape all characters in <var title="">data</var> that do
-      not match the <code title="">unreserved</code> production in the
-      URI Generic Syntax, and then further %-escape all the U+0025
-      PERCENT SIGN characters in the resulting string, and replace the
-      first occurance of "<code title="">%%%%</code>" in <var
-      title="">action</var> with the resulting double-escaped
-      string. <a href="#refsRFC3986">[RFC3986]</a></p>
+      then %-escape all bytes in <var title="">data</var> that, if
+      interpreted as US-ASCII, do not match the <code
+      title="">unreserved</code> production in the URI Generic Syntax,
+      and then, treating the result as a US-ASCII string, further
+      %-escape all the U+0025 PERCENT SIGN characters in the resulting
+      string and replace the first occurance of "<code
+      title="">%%%%</code>" in <var title="">action</var> with the
+      resulting double-escaped string. <a
+      href="#refsRFC3986">[RFC3986]</a></p>
 
       <p>Otherwise, if <var title="">action</var> contains the string
       "<code title="">%%</code>" (two U+0025 PERCENT SIGN characters
       in a row, but not four), then %-escape all characters in <var
-      title="">data</var> that do not match the <code
-      title="">unreserved</code> production in the URI Generic Syntax,
-      and replace the first occurance of "<code title="">%%</code>" in
-      <var title="">action</var> with the resulting escaped string. <a
+      title="">data</var> that, if interpreted as US-ASCII, do not
+      match the <code title="">unreserved</code> production in the URI
+      Generic Syntax, and then, treating the result as a US-ASCII
+      string, replace the first occurance of "<code
+      title="">%%</code>" in <var title="">action</var> with the
+      resulting escaped string. <a
       href="#refsRFC3986">[RFC3986]</a></p>
 
       <p>Let <var title="">target browsing context</var> be <span>the
       form submission target browsing context</span>.</p>
 
       <p><span>Navigate</span> <var title="">target browsing
       context</var> to the potentially modified <var
       title="">action</var>. If <var title="">target browsing
       context</var> was newly created for this purpose by the steps
       above, then it must be navigated with <span>replacement
@@ -31536,21 +31572,21 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
       <span>replacement enabled</span>.</p>
 
      </dd>
 
      <dt><dfn title="submit-mailto-headers">Mail with headers</dfn>
      <dd>
 
       <p>Let <var title="">headers</var> be the resulting encoding the
       <var title="">form data set</var> using the <span><code
       title="">application/x-www-form-urlencoded</code> encoding
-      algorithm</span>.</p>
+      algorithm</span>, interpreted as a US-ASCII string.</p>
 
       <p>Replace occurances of U+002B PLUS SIGN characters (+) in <var
       title="">headers</var> with the string "<code
       title="">%20</code>".</p>
 
       <p>Let <var title="">destination</var> consist of all the
       characters from the first character in <var
       title="">action</var> to the character immediately before the
       first U+003F QUESTION MARK character (?), if any, or the end of
       the string if there are none.</p>
@@ -31570,39 +31606,39 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
       this purpose by the steps above, then it must be navigated with
       <span>replacement enabled</span>.</p>
 
      </dd>
 
      <dt><dfn title="submit-mailto-body">Mail as body</dfn>
      <dd>
 
       <p>Let <var title="">body</var> be the resulting encoding the
       <var title="">form data set</var> using the <span>appropriate
-      form encoding algorithm</span> and then %-escaping all the
-      characters in the resulting string that do not match the <code
-      title="">unreserved</code> production in the URI Generic
-      Syntax. <a href="#refsRFC3986">[RFC3986]</a></p>
+      form encoding algorithm</span> and then %-escaping all the bytes
+      in the resulting byte string that, when interpreted as US-ASCII,
+      do not match the <code title="">unreserved</code> production in
+      the URI Generic Syntax. <a href="#refsRFC3986">[RFC3986]</a></p>
       
       <p>Let <var title="">destination</var> have the same value as
       <var title="">action</var>.</p>
 
       <p>If <var title="">destination</var> does not contain a U+003F
       QUESTION MARK character (?), append a single U+003F QUESTION
       MARK character (?) to <var
       title="">destination</var>. Otherwise, append a single U+0026
       AMPERSAND character (&amp;).</p>
 
       <p>Append the string "<code title="">body=</code>" to <var
       title="">destination</var>.</p>
 
-      <p>Append <var title="">body</var> to <var
-      title="">destination</var>.</p>
+      <p>Append <var title="">body</var>, interpreted as a US-ASCII
+      string, to <var title="">destination</var>.</p>
 
       <p>Let <var title="">target browsing context</var> be <span>the
       form submission target browsing context</span>.</p>
 
       <p><span>Navigate</span> <var title="">target browsing
       context</var> to <var title="">destination</var>. If <var
       title="">target browsing context</var> was newly created for
       this purpose by the steps above, then it must be navigated with
       <span>replacement enabled</span>.</p>
 
@@ -31651,57 +31687,209 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
 
   <h5>URL-encoded form data</h5>
 
   <p>The <dfn><code
   title="">application/x-www-form-urlencoded</code> encoding
   algorithm</dfn> is as follows:</p>
 
   <ol>
 
-   <li><p class="XXX">...</p></li>
+   <li><p>Let <var title="">result</var> be the empty string.</p></li>
+
+   <li>
+
+    <p>If the <code>form</code> element has an <code
+    title="attr-form-accept-charset">accept-charset</code> attribute,
+    then, taking into account the characters found in the <var
+    title="">form data set</var>'s names and values, and the character
+    encodings supported by the user agent, select a character encoding
+    from the list given in the <code>form</code>'s <code
+    title="attr-form-accept-charset">accept-charset</code> attribute
+    that is an <span>ASCII-compatible character encoding</span>. If
+    none of the encodings are supported, then let the selected
+    character encoding be UTF-8.</p>
+
+    <p>Otherwise, if the <span>document's character encoding</span> is
+    an <span>ASCII-compatible character encoding</span>, then that is
+    the selected character encoding.</p>
+
+    <p>Otherwise, let the selected character encoding be UTF-8.</p>
+
+   </li>
+
+   <li><p>Let <var title="">charset</var> be the preferred MIME name
+   of the selected character encoding.</p></li>
+
+   <li><p>If the entry's name is "<code title="">_charset_</code>" and
+   its type is "<code title="">hidden</code>", replace its value with
+   <var title="">charset</var>.</p></li>
+
+   <li><p>If the entry's type is "<code title="">file</code>", replace
+   its value with the file's filename only.</p></li>
+
+   <li>
+
+    <p>For each entry in the <var title="">form data set</var>,
+    perform these substeps:</p>
+
+    <ol>
+
+     <li><p>For each character in the entry's name and value that
+     cannot be expressed using the selected character encoding,
+     replace the character by a string consisting of a U+0026
+     AMPERSAND character (&amp;), one of more characters in the range
+     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9) representing the
+     Unicode codepoint of the character in base ten, and finally a
+     U+003B SEMICOLON character (;).</p></li>
 
-   <!-- During this step, the form data set is examined to ensure all
-   the characters are representable in the submission character
-   encoding. -->
+     <li>
+
+      <p>For each character in the entry's name and value, apply the
+      following subsubsteps:</p>
+
+      <ol>
+
+       <!-- * - . _ 0-9 a-z A-Z -->
+
+       <li><p>If the character isn't in the range U+0020, U+002A,
+       U+002D, U+002E, U+0030 .. U+0039, U+0041 .. U+005A, U+005F,
+       U+0061 .. U+007A then replace the character with a string
+       formed as follows: Start with the empty string, and then,
+       taking each byte of the character when expressed in the
+       selected character encoding in turn, append to the string a
+       U+0025 PERCENT SIGN character (%) followed by two characters in
+       the ranges U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9) and
+       U+0041 LATIN CAPITAL LETTER A to U+005A LATIN CAPITAL LETTER Z
+       representing the hexadecimal value of the byte (zero-padded if
+       necessary).</p></li>
+
+       <li><p>If the character is a U+0020 SPACE character, replace it
+       with a single U+002B PLUS SIGN character (+).</p></li>
+
+      </ol>
+
+     </li>
+
+     <li><p>If the entry's name is "<code title="">isindex</code>",
+     its type is "<code title="">text</code>", and this is the first
+     entry in the <var title="">form data set</var>, then append the
+     value to <var title="">result</var> and skip the rest of the
+     substeps for this entry, moving on to the next entry, if any, or
+     the next step in the overall algorithm otherwise.</p></li>
+
+     <li><p>If this is not the first entry, append a single U+0026
+     AMPERSAND character (&amp;) to <var
+     title="">result</var>.</p></li>
+
+     <li><p>Append the entry's name to <var
+     title="">result</var>.</p></li>
+
+     <li><p>Append a single U+003D EQUALS SIGN character (=) to <var
+     title="">result</var>.</p></li>
+
+     <li><p>Append the entry's value to <var
+     title="">result</var>.</p></li>
+
+    </ol>
+
+   </li>
+
+   <li><p>Encode <var title="">result</var> as US-ASCII and return the
+   resulting byte stream.</p></li>
 
   </ol>
 
 
   <h5>Multipart form data</h5>
 
   <p>The <dfn><code title="">multipart/form-data</code> encoding
-  algorithm</dfn> is as follows:</p>
+  algorithm</dfn> is to encode the <var title="">form data set</var>
+  using the rules described by RFC2388, <cite>Returning Values from
+  Forms: <code title="">multipart/form-data</code></cite>, and return
+  the resulting byte stream. <a href="#refsRFC2388">[RFC2388]</a></p>
 
-  <ol>
-
-   <li><p class="XXX">...</p></li>
+  <p>Each entry in the <var title="">form data set</var> is a
+  <i>field</i>, the name of the entry is the <i>field name</i> and the
+  value of the entry is the <i>field value</i>.</p>
 
-   <!-- During this step, the form data set is examined to ensure all
-   the characters are representable in the submission character
-   encoding. -->
+  <p>The order of parts must be the same as the order of fields in the
+  <var title="">form data set</var>. Multiple entries with the same
+  name must be treated as distinct fields.</p>
 
-  </ol>
+  <!-- XXX define default encoding? -->
 
 
   <h5>Plain text form data</h5>
 
   <p>The <dfn><code title="">text/plain</code> encoding
   algorithm</dfn> is as follows:</p>
 
   <ol>
 
-   <li><p class="XXX">...</p></li>
+   <li><p>Let <var title="">result</var> be the empty string.</p></li>
+
+   <li>
+
+    <!-- this is different from application/x-www-form-urlencoded in
+    that it isn't limited to ASCII-compatible encodings -->
+
+    <p>If the <code>form</code> element has an <code
+    title="attr-form-accept-charset">accept-charset</code> attribute,
+    then, taking into account the characters found in the <var
+    title="">form data set</var>'s names and values, and the character
+    encodings supported by the user agent, select a character encoding
+    from the list given in the <code>form</code>'s <code
+    title="attr-form-accept-charset">accept-charset</code>
+    attribute. If none of the encodings are supported, then let the
+    selected character encoding be UTF-8.</p>
+
+    <p>Otherwise, the selected character encoding is the
+    <span>document's character encoding</span>.</p>
+
+   </li>
+
+   <li><p>Let <var title="">charset</var> be the preferred MIME name
+   of the selected character encoding.</p></li>
+
+   <li><p>If the entry's name is "<code title="">_charset_</code>" and
+   its type is "<code title="">hidden</code>", replace its value with
+   <var title="">charset</var>.</p></li>
+
+   <li><p>If the entry's type is "<code title="">file</code>", replace
+   its value with the file's filename only.</p></li>
+
+   <li>
 
-   <!-- During this step, the form data set is examined to ensure all
-   the characters are representable in the submission character
-   encoding. -->
+    <p>For each entry in the <var title="">form data set</var>,
+    perform these substeps:</p>
+
+    <ol>
+
+     <li><p>Append the entry's name to <var
+     title="">result</var>.</p></li>
+
+     <li><p>Append a single U+003D EQUALS SIGN character (=) to <var
+     title="">result</var>.</p></li>
+
+     <li><p>Append the entry's value to <var
+     title="">result</var>.</p></li>
+
+     <li><p>Append a U+000D CARRIAGE RETURN (CR) U+000A LINE FEED (LF)
+     character pair to <var title="">result</var>.</p></li>
+
+    </ol>
+
+   </li>
+
+   <li><p>Encode <var title="">result</var> using the selected
+   character encoding and return the resulting byte stream.</p></li>
 
   </ol>
 
 
 
   <h4>Resetting a form</h4>
 
   <p>When a form <var title="">form</var> is <dfn
   title="concept-form-reset">reset</dfn>, the user agent must invoke
   the <span title="concept-form-reset-control">reset algorithm</span>
@@ -41734,22 +41922,22 @@ interface <dfn>SQLStatementErrorCallback</dfn> {
   define the exact SQL subset required in more detail.</p>
 
 
   <h5>Database query results</h5>
 
   <p>The <code title="dom-transaction-executeSql">executeSql()</code>
   method invokes its callback with a <code>SQLResultSet</code> object
   as an argument.</p>
 
   <pre class="idl">interface <dfn>SQLResultSet</dfn> {
-  readonly attribute int <span title="dom-SQLResultSet-insertId">insertId</span>;
-  readonly attribute int <span title="dom-SQLResultSet-rowsAffected">rowsAffected</span>;
+  readonly attribute long <span title="dom-SQLResultSet-insertId">insertId</span>;
+  readonly attribute long <span title="dom-SQLResultSet-rowsAffected">rowsAffected</span>;
   readonly attribute <span>SQLResultSetRowList</span> <span title="dom-SQLResultSet-rows">rows</span>;
 };</pre>
 
   <p>The <dfn
   title="dom-SQLResultSet-insertId"><code>insertId</code></dfn>
   attribute must return the row ID of the row that the
   <code>SQLResultSet</code> object's SQL statement inserted into the
   database, if the statement inserted a row. If the statement inserted
   multiple rows, the ID of the last row must be the one returned. If
   the statement did not insert a row, then the attribute must instead
@@ -41793,21 +41981,21 @@ interface <dfn>SQLStatementErrorCallback</dfn> {
   name of the column and the value of the cell, as they were returned
   by the database.</p>
 
 
   <h5>Errors</h5>
 
   <p>Errors in the database API are reported using callbacks that have
   a <code>SQLError</code> object as one of their arguments.</p>
 
   <pre class="idl">interface <dfn>SQLError</dfn> {
-  readonly attribute unsigned int <span title="dom-SQLError-code">code</span>;
+  readonly attribute unsigned long <span title="dom-SQLError-code">code</span>;
   readonly attribute DOMString <span title="dom-SQLError-message">message</span>;
 };</pre>
 
   <p>The <dfn
   title="dom-SQLError-code"><code>code</code></dfn> DOM
   attribute must return the most appropriate code from the following
   table:</p>
 
   <table>
    <thead>
@@ -47065,21 +47253,21 @@ data:&nbsp;test</pre>
  
   <pre class="idl">
 [<span title="dom-WebSocket">Constructor</span>(in DOMString url)]
 interface <dfn>WebSocket</dfn> {
   readonly attribute DOMString <span title="dom-WebSocket-URL">URL</span>;
 
   // ready state
   const unsigned short <span title="dom-WebSocket-CONNECTING">CONNECTING</span> = 0;
   const unsigned short <span title="dom-WebSocket-OPEN">OPEN</span> = 1;
   const unsigned short <span title="dom-WebSocket-CLOSED">CLOSED</span> = 2;
-  readonly attribute int <span title="dom-WebSocket-readyState">readyState</span>;
+  readonly attribute long <span title="dom-WebSocket-readyState">readyState</span>;
 
   // networking
            attribute EventListener <span title="handler-WebSocket-onopen">onopen</span>;
            attribute EventListener <span title="handler-WebSocket-onmessage">onmessage</span>;
            attribute EventListener <span title="handler-WebSocket-onclosed">onclosed</span>;
   void <span title="dom-WebSocket-postMessage">postMessage</span>(in DOMString data);
   void <span title="dom-WebSocket-disconnect">disconnect</span>();
 };</pre>
 
   <p><code>WebSocket</code> objects must also implement the
@@ -54307,25 +54495,20 @@ interface <dfn>MessageChannel</dfn> {
 
     <p>If the token has an attribute with the name "prompt", then the
     first stream of characters must be the same string as given in
     that attribute, and the second stream of characters must be
     empty. Otherwise, the two streams of character tokens together
     should, together with the <code>input</code> element, express the
     equivalent of "This is a searchable index. Insert your search
     keywords here: (input field)" in the user's preferred
     language.</p>
 
-    <p class="XXX"> Then need to specify that if the form
-    submission causes just a single form control, whose name is
-    "isindex", to be submitted, then we submit just the value part,
-    not the "isindex=" part.  </p>
-
    </dd>
 
 <!-- XXX keygen support; don't forget form element pointer!
 
    <dt>A start tag whose tag name is "keygen"</dt>
    <dd>
     ...
    </dd>
 -->
 
@@ -57327,21 +57510,20 @@ TODO (or delay):
  XXX * <select><option><hr> support?
  XXX * need explanation of when to use undo/redo, and when to use
        back/forward
  XXX * "alternate style sheet" should be "alternative style sheet"
  XXX * screen object: top left width height pixelDepth colorDepth
        availWidth availHeight availLeft availTop
  XXX * need to become consistent about whether or not to quote keyword
        ("<code title="">foo</code>" vs <code>foo</code>)
  XXX * need to properly xref events throughout, mark up DOMActivate, etc
  XXX * onclick="" only fires if it is a MouseEvent ?
- XXX * <isindex> needs some prose in the form submission section
  XXX * hsivonen makes the following suggestions:
        > To make document conformance a more useful concept for the purpose of catching
        > author errors, I suggest that the following attributes be made required:
        > href and rel on link
        > href on base
        > name and content on meta (other than the encoding decl)
        > src on img
        > code, height and width on applet
        > name and value on param
  XXX * command="" feature

|