Re: FIELDSET, LEGEND, HTML, & XHTML

Christian Wolfgang Hujer <Christian.Hujer@itcqis.com> wrote:

> I have a final question:
> HTML 4 says, the legend element must be the first child (apart from text 
> nodes containing white-space) in the fieldset element:
> <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
> I am no SGML expert, but that's how I understand this definition.

Correct.

> So will fieldset be declared the following way in the future of XHTML?
> <!ELEMENT fieldset (legend, (%block; | form | %inline; | %misc;)*)>
> (Changing fieldset in a way not containing text nodes directly)
> 
> Within fieldsets, this would require the proper use for label elements around 
> input labels and the use of div or span elements around text that isn't a 
> label. This would enforce more structure.

That's technically possible, but as we move to XForms, it is highly
unlikely that there will be a new version of XHTML forms.  XForms 1.0
requires the caption element (a la XHTML's label element) as the first
child of form controls, so basically it does what you want.  See:

    http://www.w3.org/TR/xforms/slice8.html#ui-common-elements-caption

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Wednesday, 13 February 2002 14:06:50 UTC