[html5] r2318 - [] (0) WF2: Attributes for form submission
whatwg at whatwg.org
whatwg at whatwg.org
Thu Oct 9 19:19:25 PDT 2008
Author: ianh
Date: 2008-10-09 19:19:24 -0700 (Thu, 09 Oct 2008)
New Revision: 2318
Modified:
index
source
Log:
[] (0) WF2: Attributes for form submission
Modified: index
===================================================================
--- index 2008-10-10 00:53:26 UTC (rev 2317)
+++ index 2008-10-10 02:19:24 UTC (rev 2318)
@@ -27322,36 +27322,79 @@
<h4 id=attributes-for-form-submission><span class=secno>4.10.14 </span><dfn>Attributes for form submission</dfn></h4>
- <p class=XXX>... <dfn id=attr-fs-action title=attr-fs-action>action</dfn> content attribute</p>
+ <p>Attributes for form submission can be specified both on
+ <code><a href=#the-form-element>form</a></code> elements and on elements that represent buttons
+ that submit forms, e.g. an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a> state. The
+ attributes on the buttons, when omitted, default to the values given
+ on the corresponding the <code><a href=#the-form-element>form</a></code> element.</p>
- <p class=XXX>... <dfn id=dom-fs-action title=dom-fs-action>action</dfn> DOM attribute</p>
+ <p>The <dfn id=attr-fs-action title=attr-fs-action><code>action</code></dfn> content
+ attribute, if specified, must have a value that is a <a href=#valid-url>valid
+ URL</a>.</p>
- <p class=XXX>... <dfn id=concept-fs-action title=concept-fs-action>action</dfn> if present else form's else default</p>
- <!-- XXX mozilla bug 297761 -->
+ <p>The <dfn id=concept-fs-action title=concept-fs-action>action</dfn> of an element is
+ the value of the element's <code title=attr-fs-action><a href=#attr-fs-action>action</a></code> attribute, if it has one, or
+ the value of its <a href=#form-owner>form owner</a>'s <code title=attr-fs-action><a href=#attr-fs-action>action</a></code> attribute, if <em>it</em> has
+ one, or else the empty string.</p>
- <p class=XXX>... <dfn id=attr-fs-method title=attr-fs-method>method</dfn> content attribute</p>
+ <p>The <dfn id=attr-fs-method title=attr-fs-method><code>method</code></dfn> content
+ attribute is an <a href=#enumerated-attribute>enumerated attribute</a> with the following
+ keywords and states:</p>
- <p class=XXX>... <dfn id=dom-fs-method title=dom-fs-method>method</dfn> DOM attribute</p>
+ <ul><li>The keyword <dfn id=attr-fs-method-get-keyword title=attr-fs-method-GET-keyword><code>GET</code></dfn>, mapping
+ to the state <dfn id=attr-fs-method-get title=attr-fs-method-GET>GET</dfn>, indicating
+ the HTTP GET method.</li>
- <p class=XXX>... <dfn id=concept-fs-method title=concept-fs-method>method</dfn> if present else form's else default</p>
+ <li>The keyword <dfn id=attr-fs-method-post-keyword title=attr-fs-method-POST-keyword><code>POST</code></dfn>, mapping
+ to the state <dfn id=attr-fs-method-post title=attr-fs-method-POST>POST</dfn>, indicating
+ the HTTP POST method.</li>
- <p class=XXX>... <dfn id=attr-fs-enctype title=attr-fs-enctype>enctype</dfn> content attribute</p>
+ <li>The keyword <dfn id=attr-fs-method-put-keyword title=attr-fs-method-PUT-keyword><code>PUT</code></dfn>, mapping
+ to the state <dfn id=attr-fs-method-put title=attr-fs-method-PUT>PUT</dfn>, indicating
+ the HTTP PUT method.</li>
- <p class=XXX>... <dfn id=dom-fs-enctype title=dom-fs-enctype>enctype</dfn> DOM attribute</p>
+ <li>The keyword <dfn id=attr-fs-method-delete-keyword title=attr-fs-method-DELETE-keyword><code>DELETE</code></dfn>, mapping
+ to the state <dfn id=attr-fs-method-delete title=attr-fs-method-DELETE>DELETE</dfn>, indicating
+ the HTTP DELETE method.</li>
- <p class=XXX>... <dfn id=concept-fs-enctype title=concept-fs-enctype>enctype</dfn> if present else form's else default</p>
+ </ul><p>The <i>missing value default</i> is the <a href=#attr-fs-method-get title=attr-fs-method-GET>GET</a> state.</p>
- <p class=XXX>... <dfn id=attr-fs-target title=attr-fs-target>target</dfn> content attribute</p>
+ <p>The <dfn id=concept-fs-method title=concept-fs-method>method</dfn> of an element is
+ one of those four states. If the element has a <code title=attr-fs-method><a href=#attr-fs-method>method</a></code> attribute, then the element's
+ <a href=#concept-fs-method title=concept-fs-method>method</a> is that attribute's
+ state; otherwise, it is the <a href=#form-owner>form owner</a>'s <code title=attr-fs-method><a href=#attr-fs-method>method</a></code> attribute's state.</p>
- <p class=XXX>... <dfn id=dom-fs-target title=dom-fs-target>target</dfn> DOM attribute</p>
+ <p>The <dfn id=attr-fs-enctype title=attr-fs-enctype><code>enctype</code></dfn>
+ content attribute is an <a href=#enumerated-attribute>enumerated attribute</a> with the
+ following keywords and states:</p>
- <p class=XXX>... <dfn id=concept-fs-target title=concept-fs-target>target</dfn> if present else form's else base target else default</p> <!-- c.f. hyperlink following -->
+ <ul><li>The "<dfn id=attr-fs-enctype-urlencoded title=attr-fs-enctype-urlencoded><code>application/x-www-form-urlencoded</code></dfn>" keyword and corresponding state.</li>
+ <li>The "<dfn id=attr-fs-enctype-formdata title=attr-fs-enctype-formdata><code>multpart/form-data</code></dfn>" keyword and corresponding state.</li>
+ <li>The "<dfn id=attr-fs-enctype-text title=attr-fs-enctype-text><code>text/plain</code></dfn>" keyword and corresponding state.</li>
+ </ul><p>The <i>missing value default</i> is the <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code>
+ state.</p>
- <p>Attributes for form submission can be specified both on
- <code><a href=#the-form-element>form</a></code> elements and on elements that represent buttons
- that submit forms, e.g. an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a> state. The
- attributes on the buttons, when omitted, default to the values given
- on the corresponding the <code><a href=#the-form-element>form</a></code> element.</p>
+ <p>The <dfn id=concept-fs-enctype title=concept-fs-enctype>enctype</dfn> of an element is
+ one of those four states. If the element has a <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code> attribute, then the element's
+ <a href=#concept-fs-enctype title=concept-fs-enctype>enctype</a> is that attribute's
+ state; otherwise, it is the <a href=#form-owner>form owner</a>'s <code title=attr-fs-enctype><a href=#attr-fs-enctype>enctype</a></code> attribute's state.</p>
+
+ <p>The <dfn id=attr-fs-target title=attr-fs-target><code>target</code></dfn> content
+ attribute, if present, must be a <a href=#valid-browsing-context-name-or-keyword>valid browsing context name
+ or keyword</a>.
+
+ <p>The <dfn id=concept-fs-target title=concept-fs-target>target</dfn> of an element is
+ the value of the element's <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attribute, if it has one; or
+ the value of its <a href=#form-owner>form owner</a>'s <code title=attr-fs-target><a href=#attr-fs-target>target</a></code> attribute, if <em>it</em> has
+ one; or, if one of the child nodes of <a href=#the-head-element-0>the <code>head</code>
+ element</a> is a <code><a href=#the-base-element>base</a></code> element with a <code title=attr-base-target><a href=#attr-base-target>target</a></code> attribute, then the the value
+ of the <code title=attr-base-target><a href=#attr-base-target>target</a></code> attribute of the
+ first such <code><a href=#the-base-element>base</a></code> element; or, if there is no such
+ element, the empty string.</p> <!-- c.f. hyperlink following -->
+
+ <p>The <dfn id=dom-fs-action title=dom-fs-action><code>action</code></dfn>, <dfn id=dom-fs-method title=dom-fs-method><code>method</code></dfn>, <dfn id=dom-fs-enctype title=dom-fs-enctype><code>enctype</code></dfn>, and <dfn id=dom-fs-target title=dom-fs-target><code>target</code></dfn> DOM attributes must
+ <a href=#reflect>reflect</a> the respective content attributes of the same
+ name.</p>
@@ -27645,6 +27688,12 @@
<li><p>Let <var title="">action</var> be the <var title="">submitter</var> element's <a href=#concept-fs-action title=concept-fs-action>action</a>.</li>
+ <li><p>If <var title="">action</var> is the empty string, let <var title="">action</var> be <span>the document's address</span><!--
+ XXXDOCURL -->.</p> <!-- Don't ask me why. But that's what IE
+ does. It even treats action="" differently from action=" " or
+ action="#" (the latter two resolve to the base URL, the first one
+ resolves to the doc URL) -->
+
<li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
<a href=#url>URL</a> <var title="">action</var>. If this fails, abort
these steps.</li>
@@ -27668,10 +27717,10 @@
defined below the table.</p>
<table><tr><td>
- <th> <span title=attr-fs-method-GET>GET</span>
- <th> <span title=attr-fs-method-POST>POST</span>
- <th> <span title=attr-fs-method-PUT>PUT</span>
- <th> <span title=attr-fs-method-DELETE>DELETE</span>
+ <th> <a href=#attr-fs-method-get title=attr-fs-method-GET>GET</a>
+ <th> <a href=#attr-fs-method-post title=attr-fs-method-POST>POST</a>
+ <th> <a href=#attr-fs-method-put title=attr-fs-method-PUT>PUT</a>
+ <th> <a href=#attr-fs-method-delete title=attr-fs-method-DELETE>DELETE</a>
<tr><th> <code title="">http</code>
<td> <a href=#submit-mutate-action title=submit-mutate-action>Mutate action</a>
<td> <a href=#submit-body title=submit-body>Submit as entity body</a>
@@ -27820,15 +27869,15 @@
<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>
+ <dl><dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></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>
+ <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-formdata><a href=#attr-fs-enctype-formdata>multpart/form-data</a></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>
+ <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-text><a href=#attr-fs-enctype-text>text/plain</a></code></dt>
<dd>Let <var title="">MIME type</var> be "<code title="">text/plain</code>".</dd>
@@ -27926,17 +27975,17 @@
<p>The <dfn id=appropriate-form-encoding-algorithm>appropriate form encoding algorithm</dfn> is
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>
+ <dl><dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-urlencoded><a href=#attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a></code></dt>
<dd>Use the <a href=#application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
algorithm</a>.</dd>
- <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-formdata>multpart/form-data</code></dt>
+ <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-formdata><a href=#attr-fs-enctype-formdata>multpart/form-data</a></code></dt>
<dd>Use the <a href=#multipart/form-data-encoding-algorithm><code title="">multipart/form-data</code> encoding
algorithm</a>.</dd>
- <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-text>text/plain</code></dt>
+ <dt>If <var title="">enctype</var> is <code title=attr-fs-enctype-text><a href=#attr-fs-enctype-text>text/plain</a></code></dt>
<dd>Use the <a href=#text/plain-encoding-algorithm><code title="">text/plain</code> encoding
algorithm</a>.</dd>
Modified: source
===================================================================
--- source 2008-10-10 00:53:26 UTC (rev 2317)
+++ source 2008-10-10 02:19:24 UTC (rev 2318)
@@ -30675,38 +30675,106 @@
<h4><dfn>Attributes for form submission</dfn></h4>
- <p class="XXX">... <dfn title="attr-fs-action">action</dfn> content attribute</p>
+ <p>Attributes for form submission can be specified both on
+ <code>form</code> elements and on elements that represent buttons
+ that submit forms, e.g. an <code>input</code> element whose <code
+ title="attr-input-type">type</code> attribute is in the <span
+ title="attr-input-type-submit">Submit Button</span> state. The
+ attributes on the buttons, when omitted, default to the values given
+ on the corresponding the <code>form</code> element.</p>
- <p class="XXX">... <dfn title="dom-fs-action">action</dfn> DOM attribute</p>
+ <p>The <dfn title="attr-fs-action"><code>action</code></dfn> content
+ attribute, if specified, must have a value that is a <span>valid
+ URL</span>.</p>
- <p class="XXX">... <dfn title="concept-fs-action">action</dfn> if present else form's else default</p>
- <!-- XXX mozilla bug 297761 -->
+ <p>The <dfn title="concept-fs-action">action</dfn> of an element is
+ the value of the element's <code
+ title="attr-fs-action">action</code> attribute, if it has one, or
+ the value of its <span>form owner</span>'s <code
+ title="attr-fs-action">action</code> attribute, if <em>it</em> has
+ one, or else the empty string.</p>
- <p class="XXX">... <dfn title="attr-fs-method">method</dfn> content attribute</p>
+ <p>The <dfn title="attr-fs-method"><code>method</code></dfn> content
+ attribute is an <span>enumerated attribute</span> with the following
+ keywords and states:</p>
- <p class="XXX">... <dfn title="dom-fs-method">method</dfn> DOM attribute</p>
+ <ul>
- <p class="XXX">... <dfn title="concept-fs-method">method</dfn> if present else form's else default</p>
+ <li>The keyword <dfn
+ title="attr-fs-method-GET-keyword"><code>GET</code></dfn>, mapping
+ to the state <dfn title="attr-fs-method-GET">GET</dfn>, indicating
+ the HTTP GET method.</li>
- <p class="XXX">... <dfn title="attr-fs-enctype">enctype</dfn> content attribute</p>
+ <li>The keyword <dfn
+ title="attr-fs-method-POST-keyword"><code>POST</code></dfn>, mapping
+ to the state <dfn title="attr-fs-method-POST">POST</dfn>, indicating
+ the HTTP POST method.</li>
- <p class="XXX">... <dfn title="dom-fs-enctype">enctype</dfn> DOM attribute</p>
+ <li>The keyword <dfn
+ title="attr-fs-method-PUT-keyword"><code>PUT</code></dfn>, mapping
+ to the state <dfn title="attr-fs-method-PUT">PUT</dfn>, indicating
+ the HTTP PUT method.</li>
- <p class="XXX">... <dfn title="concept-fs-enctype">enctype</dfn> if present else form's else default</p>
+ <li>The keyword <dfn
+ title="attr-fs-method-DELETE-keyword"><code>DELETE</code></dfn>, mapping
+ to the state <dfn title="attr-fs-method-DELETE">DELETE</dfn>, indicating
+ the HTTP DELETE method.</li>
- <p class="XXX">... <dfn title="attr-fs-target">target</dfn> content attribute</p>
+ </ul>
- <p class="XXX">... <dfn title="dom-fs-target">target</dfn> DOM attribute</p>
+ <p>The <i>missing value default</i> is the <span
+ title="attr-fs-method-GET">GET</span> state.</p>
- <p class="XXX">... <dfn title="concept-fs-target">target</dfn> if present else form's else base target else default</p> <!-- c.f. hyperlink following -->
+ <p>The <dfn title="concept-fs-method">method</dfn> of an element is
+ one of those four states. If the element has a <code
+ title="attr-fs-method">method</code> attribute, then the element's
+ <span title="concept-fs-method">method</span> is that attribute's
+ state; otherwise, it is the <span>form owner</span>'s <code
+ title="attr-fs-method">method</code> attribute's state.</p>
- <p>Attributes for form submission can be specified both on
- <code>form</code> elements and on elements that represent buttons
- that submit forms, e.g. an <code>input</code> element whose <code
- title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-submit">Submit Button</span> state. The
- attributes on the buttons, when omitted, default to the values given
- on the corresponding the <code>form</code> element.</p>
+ <p>The <dfn title="attr-fs-enctype"><code>enctype</code></dfn>
+ content attribute is an <span>enumerated attribute</span> with the
+ following keywords and states:</p>
+
+ <ul>
+ <li>The "<dfn title="attr-fs-enctype-urlencoded"><code>application/x-www-form-urlencoded</code></dfn>" keyword and corresponding state.</li>
+ <li>The "<dfn title="attr-fs-enctype-formdata"><code>multpart/form-data</code></dfn>" keyword and corresponding state.</li>
+ <li>The "<dfn title="attr-fs-enctype-text"><code>text/plain</code></dfn>" keyword and corresponding state.</li>
+ </ul>
+
+ <p>The <i>missing value default</i> is the <code
+ title="attr-fs-enctype-urlencoded">application/x-www-form-urlencoded</code>
+ state.</p>
+
+ <p>The <dfn title="concept-fs-enctype">enctype</dfn> of an element is
+ one of those four states. If the element has a <code
+ title="attr-fs-enctype">enctype</code> attribute, then the element's
+ <span title="concept-fs-enctype">enctype</span> is that attribute's
+ state; otherwise, it is the <span>form owner</span>'s <code
+ title="attr-fs-enctype">enctype</code> attribute's state.</p>
+
+ <p>The <dfn title="attr-fs-target"><code>target</code></dfn> content
+ attribute, if present, must be a <span>valid browsing context name
+ or keyword</span>.
+
+ <p>The <dfn title="concept-fs-target">target</dfn> of an element is
+ the value of the element's <code
+ title="attr-fs-target">target</code> attribute, if it has one; or
+ the value of its <span>form owner</span>'s <code
+ title="attr-fs-target">target</code> attribute, if <em>it</em> has
+ one; or, if one of the child nodes of <span>the <code>head</code>
+ element</span> is a <code>base</code> element with a <code
+ title="attr-base-target">target</code> attribute, then the the value
+ of the <code title="attr-base-target">target</code> attribute of the
+ first such <code>base</code> element; or, if there is no such
+ element, the empty string.</p> <!-- c.f. hyperlink following -->
+
+ <p>The <dfn title="dom-fs-action"><code>action</code></dfn>, <dfn
+ title="dom-fs-method"><code>method</code></dfn>, <dfn
+ title="dom-fs-enctype"><code>enctype</code></dfn>, and <dfn
+ title="dom-fs-target"><code>target</code></dfn> DOM attributes must
+ <span>reflect</span> the respective content attributes of the same
+ name.</p>
@@ -31092,6 +31160,13 @@
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
+ title="">action</var> be <span>the document's address</span><!--
+ XXXDOCURL -->.</p> <!-- Don't ask me why. But that's what IE
+ does. It even treats action="" differently from action=" " or
+ action="#" (the latter two resolve to the base URL, the first one
+ resolves to the doc URL) -->
+
<li><p><span title="resolve a url">Resolve</span> the
<span>URL</span> <var title="">action</var>. If this fails, abort
these steps.</p></li>
More information about the Commit-Watchers
mailing list