W3C home > Mailing lists > Public > www-html@w3.org > February 2002

Re: FIELDSET, LEGEND, HTML, & XHTML

From: Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Wed, 13 Feb 2002 11:04:25 +0100
To: Masayasu Ishikawa <mimasa@w3.org>, www-html@w3.org
Message-ID: <16awKH-215bNoC@fmrl06.sul.t-online.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,


Am Dienstag, 12. Februar 2002 20:02 schrieb Masayasu Ishikawa:
> Christian Wolfgang Hujer <Christian.Hujer@itcqis.com> wrote:
> > Am Freitag, 8. Februar 2002 18:36 schrieb Joe Kaczmarek:
> This is one of several places where XHTML 1.0 cannot approximate
> the definition of HTML 4.01 due to the difference between SGML and
> XML.  XML doesn't allow the content model like the FIELDSET content
> model in HTML 4.01, so in order to approximate the definition, XHTML
> 1.0 had to loosen the content model.
>
> The FIELDSET content model was already a thorny one in HTML 4.01, as
> noted in a comment just above the element type declaration of FIELDSET:
>
> <!--
>   #PCDATA is to solve the mixed content problem,
>   per specification only whitespace is allowed there!
>  -->
>
> And in XHTML 1.0 DTDs, there is also a comment as follows:
>
> <!--
>   The fieldset element is used to group form fields.
>   Only one legend element should occur in the content
>   and if present should only be preceded by whitespace.
> -->
>
> So the semantics hasn't changed, but the XHTML 1.0 DTDs cannot
> enforce this restriction due to the limitation of XML 1.0.  XML
> Schema could cope with this problem better, though.
>
> Regards,
thank you very much for responding.

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.

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.

I like structure :)

Just a suggestion.

Or is the DTD way of validation intended to just be an interim 
solution and the definitive ultimate form of validation will be the Schema?


Greetings
- -- 
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
ITCQIS GmbH
Telefon: +49 (089) 27 37 04 37
Telefax: +49 (089) 27 37 04 39
E-Mail: mailto:Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8ajotGU/Ex9kzkZ4RAmz5AKDDUfwNgkLXJ/gV/22Gjz1zMadITwCgog/3
hzo9UNYfbC7SbcWGtTst4fg=
=wz4/
-----END PGP SIGNATURE-----
Received on Wednesday, 13 February 2002 05:07:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:50 GMT