[whatwg] Web Forms 2.0 Editorial [minor] Section 5

5. Form submission
------------------

# These controls are all those whose form DOM attribute points at the form and
# that are not in the form's templateElements DOM attribute (this excludes
# certain controls as specified in the section describing the repetition
# model).

   These controls are all those whose form DOM attribute points at the form
   >but< are not in the form's templateElements DOM attribute (this excludes
   certain controls as specified in the section describing the repetition
   model).

You might want to word this without relying so heavily on the DOM, too.
(The rest of the process refers to the DOM when necessary, but doesn't
  rely on it to specify other things.)


# A form data set is a sequence of control-name, index, current-value triplets
# constructed from the controls identified in the previous step.
#
# The index here is unrelated to the repetition index mentioned earlier.

I suggest calling this index the "control index" to help reduce the confusion.

# It is constructed by iterating over the form controls listed in step three,
# taking note of the form control names as they are seen. With each control,
# if it is the first time that control's name has been seen, then the control
# is assigned an index of 0.

   It is constructed by iterating over the form controls listed in step three,
   taking note of the form control names as they are >processed<. With each
   control, if it is the first time that control's name has been >encountered<,
   then the control is assigned an index of 0.

# The indices of these two virtual controls are handled separately and could,
# depending on the values of other controls, end up with different values.

Could you give an example for this?


# The form data set also includes a list of which repetition blocks are
# involved in the submission.
#
# For each control in the form data set, the control and the control's ancestors
# are examined, up to but not including the first node that is a common ancestor
# of the control and the form, or is the form itself. For each element so
# examined, if it is a repetition block that is not an orphan repetition block
# and whose template does have an ID, and that repetition block has not yet been
# added to the list of repetition blocks, it is added.

Two problems here:
   1. This list of repetition blocks is coming out of nowhere, considering the
      statement that "A form data set *is* a sequence of control-name, index,
      current-value triplets..."
   2. You're specifying an algorithm where a description would do.

Replace these two paragraphs with:

   The list of repetition blocks consists of all repetition blocks that include
   at least one form control from the form control list, in document order.

And change the beginning of this step from

# A form data set is a sequence of control-name, index, current-value triplets
# constructed from the controls identified in the previous step.

to

   The form data set consists of a form control list and a repetition block list.

   The form control list is a sequence of control-name, control-index,
   current-value triplets constructed from the controls identified in the
   previous step.

# During this step, the form data set is examined to ensure all the characters
# are representable in the submission character encoding.

   During this step, the form data set is examined to ensure >that< all the
   characters are representable in the submission character encoding.

# For example if the action denotes an HTTP resource, method is "POST", the
# replace attribute is document  and the remote server replies with a 200 OK
# response, then the returned document should be displayed to the user as if
# the user had navigated to that document by following a link to it.

   For example if <> action denotes an HTTP resource, method is "POST", <>
   replace <> is document>,< and the remote server replies with a 200 OK
   response, then the returned document should be displayed to the user as if
   the user had navigated to that document by following a link to it.

# (Any target attribute is ignored.)

   (The target attribute does not apply.)


5.1 Successful form controls
----------------------------

   No editorial comments (yet).


5.2. Handling characters outside the submission character set
-------------------------------------------------------------

# Sometimes, the form submission character set used is not able to represent all
# the character present in the form submission.

   Sometimes, the form submission character set used is not able to represent all
   <> character>s< present in the form submission.


5.3. application/x-www-form-urlencoded
--------------------------------------

# It could be explicitly specified by the page, overriden by the user, or
# auto-detected by the UA. For example, HTML4 section 5.2.2 [HTML4].

   It could be explicitly specified by the page, overriden by the user, or
   auto-detected by the UA. See, HTML4 section 5.2.2 [HTML4].

[Fragment]


5.4. application/x-www-form+xml: XML submission
-----------------------------------------------

# The type attribute is also optional and must contain the MIME type of the
# file, or be omitted if the client is unaware of the correct type.

   The type attribute is also optional and must >either< contain the MIME type
   of the file<> or be omitted if the client is unaware of the correct type.


5.6. Semantics of method and enctype attributes
-----------------------------------------------

# 5.6. Semantics of method and enctype attributes

5.6 Submitting the encoded form data set

Because that's what it's really about. It's certainly not
about the semantics of 'enctype' -- that's already been covered.
It's as much about 'enctype' as it is about 'action' -- if you
really want to name it after an attribute, name it after 'method'
only.


As for the tables, reverse the rows and columns. It'll make the
tables much easier to read.

=== End section 5 ===

~fantasai

-- 
http://fantasai.inkedblade.net/contact

Received on Wednesday, 16 June 2004 06:21:42 UTC