Re: HTML 2.0 Spec questions

Paul Burchard (burchard@horizon.math.utah.edu)
Tue, 22 Nov 94 09:04:13 EST

"Daniel W. Connolly" <connolly@hal.com> writes:
> [Dan's unnamed correspondent writes:]
> > First off, there are some places that occasionally imply
> > that a begin and end marker for some elements are needed
> > but the DTD (or other parts of the spec) implies that only a
> > begin marker is necessary. This can be confusing if you

> > don't read the entire spec. For example, under Section
> > 2.6 HTML Forms, the OPTION element appears to be defined
> > as requiring the format <OPTION>...</OPTION> but the
> > DTD in Section 7.1 says that the </OPTION> is optional.
>
> 2.6 is wrong:

Not only does Section 2.1.6 incorrectly list both <INPUT>...</INPUT>
and <OPTION>...</OPTION>, but further on the reverse error is made.
Section 3.15.2 writes <FORM> (instead of <FORM>...</FORM>), Section
3.15.5 writes <SELECT>, and Section 3.15.6 writes <TEXTAREA>.
Section 3.15.3 appears to be missing the <INPUT> listing altogether.

> > Given the FORMs example snippet of "<P
> > ALIGN=CENTER><INPUT TYPE=SUBMIT><INPUT

> > TYPE=RESET></FORM>"

By the way, as I've already reported, this example is incorrect.
There is no ALIGN attribute of the P tag in HTML 2.0 (it's a HTML 3.0
feature).

> > All INPUT attributes should be labeled as optional since
> > according to the DTD none are required. JOOC, what would
> > an INPUT field with no attributes be used for and what
> > would be an example of how it should be rendered??
>
> Hmmm... isn't the NAME attribute required? Sure
> enough... I wonder if this should be changed???

No, the NAME attribute is not required for all INPUT types -- in
particular, the SUBMIT and RESET types do not require a NAME, and
this is a commonly used idiom. So I don't think this should be
checked at the DTD level. Other INPUT types sans NAME are a bit less
useful. :-)

> > Given the following snippets, what would be the
> > name/value pairs to be sent when the user selected the
> > Submit button (there is no VALUE entry for the second
> > example below)?

> > <INPUT NAME="Foo" VALUE="Yes" TYPE=SUBMIT>
> > <INPUT NAME="Bar" TYPE=SUBMIT>
>

> Out of scope. Err...

Well, in this case, the spec text does say what happens, at least for
the SUBMIT type:

SUBMIT [...] You can use the VALUE attribute to provide
a non-editable label to be displayed on the button.
The default label is application-specific.

Thus, if you specify a NAME and no VALUE, the "application-specific"
label that adorns the button will be sent as the value of that field.

It looks like the description of the RESET type should also contain
the same incantation.

P.S. Dan, I noticed a typo in the comments in the DTD. The following
should indicate "VALUE=":

> <!-- <OPTION VALUE> Form datum value for this option -->

--------------------------------------------------------------------
Paul Burchard <burchard@math.utah.edu>
``I'm still learning how to count backwards from infinity...''
--------------------------------------------------------------------