Re: Form elements and the rest of the document

Abigail (abigail@uk.fnx.com)
Wed, 10 Jul 1996 17:12:01 +0100


Message-ID: <31E3D651.41C67EA6@uk.fnx.com>
Date: Wed, 10 Jul 1996 17:12:01 +0100
From: Abigail <abigail@uk.fnx.com>
To: www-html@w3.org
Subject: Re: Form elements and the rest of the document

Sunil Mishra wrote:
> 
> \\ The idea is that you can use all the tags you mention to "dress up"
> \\ a form. It is not a strict requirement, but all the tags which belong
> \\ in forms should appear in the context of a form somewhere. Things like
> \\ <SUP><TEXTAREA NAME=foo ROWS=1 COLS=1></SUP> are legal, but quite
> \\ pointless.
> \\
> \\ It's not a parser's job to make sense of HTML. That is up to the
> \\ renderer. It seems reasonable to me that you can safely ignore form
> \\ tags which do not appear inside a form.
> \\
> \\ Galactus
> \\
> 
> True, but HTML 2.0 offered a perfectly good way out of this situation
> without introducing this kind of ambiguity. They added an inclusion to the
> form element in the DTD.
> 
> <!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)>
> 
> Why wasn't the same method followed for HTML 3.2? I mean, was there a
> reason, or was this just an oversight?

The problem is that the inclusion method leads to problems. It makes the
following syntax _legal_:

<FORM METHOD = POST ACTION = "url">
<TABLE>
<INPUT TYPE = TEXT VALUE = "Look ma! Outside of a row!">
<TR>
<TEXTAREA>And this is outside of any cell</TEXTAREA>
<TD>Blah</TD>
</TR>
</TABLE>
</FORM>


Not very nice either. The inclusion method means that the included elements
are legal *everywhere* in the element, even where they don't make sense at all.



Abigail