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


From: Masayasu Ishikawa <mimasa@w3.org>
Date: Wed, 13 Feb 2002 04:02:13 +0900 (JST)
Message-Id: <20020213.040213.08337556.mimasa@w3.org>
To: www-html@w3.org
Christian Wolfgang Hujer <Christian.Hujer@itcqis.com> wrote:

> 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 -->
> This is obviously either an undocumented change in the semantics and 
> behaviour of fieldset or just a bug (typo: | instead of ,).

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.

Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Tuesday, 12 February 2002 14:02:25 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 15 July 2018 06:07:48 UTC