At 6/5/2007 05:54 AM, Nick Fitzsimons wrote:
It's only valid "by the DTD" in the sense that the DTD is incapable
of expressing all the constraints imposed upon the usage of HTML
elements; those constraints are made explicit in the spec by such
means as the sentence you originally quoted.


Hi Nick,

I agree with most of the arguments for restricting FIELDSET to forms, including that the positioning of FIELDSET on the FORMS page of the spec appears to make the intended context of its usage quite clear.

However, the DTD itself -- that rigid spine of the HTML spec -- is certainly capable of expressing descendant constraints. In this case it does not require that a FIELDSET contain any input controls at all, as I read it. Here's what it stipulates for HTML 4.01 Strict:

<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
http://www.w3.org/TR/html4/sgml/dtd.html

...which I believe says that it must contain %PCDATA (character data) followed by LEGEND followed by optional %flow. %flow can be %block and/or %inline which leaves the list of descendants wide open. LEGEND in turn must contain (%inline;)* -- zero or more inline elements -- therefore none of FIELDSET's descendants must contain an input control.

The FIELDSET definition could easily have included:

        (INPUT|SELECT|TEXTAREA|BUTTON)+
or:
        (%formctrl)+

But it doesn't. The English language comment in the DTD says "form control group" but the SGML syntax itself explicitly permits a FIELDSET group to contain no input controls at all.

We can speculate on the reasons for this presumably deliberate lack of specificity -- perhaps the DTD engineers were leaving room for us to markup "display versions" of input forms, for example -- but we cannot argue that the DTD omitted this because it was incapable of expressing such contraints.

To confirm my interpretation of the DTD I referred to:

        On SGML and HTML
        http://www.w3.org/TR/html4/intro/sgmltut.html

Regards,

Paul
__________________________

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to