- From: Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
- Date: Sun, 10 Feb 2002 11:52:50 +0100
- To: Joe Kaczmarek <joe@joek.com>, www-html@w3.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Joe, Am Freitag, 8. Februar 2002 18:36 schrieb Joe Kaczmarek: > First the question: > Why does HTML validation require a LEGEND for FIELDSET, while XHTML > validation does not? The definition of fieldset is indeed quite relaxed in XHTML 1.0 Strict: <!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*> The same applies to XHTML 1.0 Transitional: <!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*> While this is the definition of fieldset in HTML 4.01 Strict: <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group --> And this is the definition of fieldset in HTML 4.01 Transitional, again the same: <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group --> The definition in Modularization of XHTML is: <!ENTITY % fieldset.element "INCLUDE" > <![%fieldset.element;[ <!ENTITY % fieldset.content "( #PCDATA | %legend.qname; | %Flow.mix; )*" > <!ELEMENT %fieldset.qname; %fieldset.content; > <!-- end of fieldset.element -->]]> Which is translated into <!ELEMENT fieldset (#PCDATA | legend | %Flow.mix;)*> and looks like a mixture of the HTML 4.01 and XHTML 1.0 definition. This is obviously either an undocumented change in the semantics and behaviour of fieldset or just a bug (typo: | instead of ,). I suggest you report this as a bug, because it is either a bug in the dtd (the dtd is wrong and should be different) or it is a bug in the documentation of XHTML because this change has not been documented. > Now some background: > While checking my site at Bobby (http://www.cast.org/bobby/) it > recommended using FIELDSET within FORMs. Now, maybe since I only have The validator sometimes only can guess what might have to be done to get the file valid if it is invalid. The recommendation of the validator is not neccessarily the best solution, it's just one that works. Usually problems with forms in XHTML are that newer versions require form to contain block, not flow. So a nested <div/> or <p/> containing the form elements usually helps. > one field within my FORM this isn't needed, but when I included > FIELDSET, I could no longer validate as HTML 4.01 Transitional without > also including LEGEND. > > But, another site I checked for reference > (http://www.neuralust.com/~cac6982/) is written in XHTML 1.0 Strict, > includes FIELDSET, does not have a LEGEND, and yet it validates. > > Is there a discrepency that XHTML does not require LEGEND with FIELDSET > but HTML does? Yes, as described above, there obviously is. 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 iD8DBQE8ZlEIGU/Ex9kzkZ4RAiCQAJ9cHB4yN+I0X99wCPhKtSCa2IHJ8ACdEZXB 4LdEbZ92g0WG/n26ceZzy3s= =KdgC -----END PGP SIGNATURE-----
Received on Sunday, 10 February 2002 05:57:06 UTC