This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22372 - validator claims 'document type does not allow element "UL" here', but I think HTML 4.01 Transitional does; or else HTML 4.01 Specification is unclear
Summary: validator claims 'document type does not allow element "UL" here', but I thin...
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: 1.3
Hardware: PC Linux
: P2 minor
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2013-06-15 04:43 UTC by J. Randall Owens
Modified: 2015-02-16 00:38 UTC (History)
1 user (show)

See Also:


Description J. Randall Owens 2013-06-15 04:43:20 UTC
Test case:
If Bugzilla has a problem with the URL more than a line long, shortened: if you're paranoid

This is the pretty bare-bones test case here. A fieldset within a form, and an unordered list within the fieldset. The Validator tells me 'document type does not allow element "UL" here'. If I enable a legend element in it (currently commented out) before the UL, it validates. But in the HTML 4.01 Transitional (which that page is) DTD:

  #PCDATA is to solve the mixed content problem,
  per specification only whitespace is allowed there!
<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
  %attrs;                              -- %coreattrs, %i18n, %events --

<!ELEMENT LEGEND - - (%inline;)*       -- fieldset legend -->

  %attrs;                              -- %coreattrs, %i18n, %events --
  accesskey   %Character;    #IMPLIED  -- accessibility key character --

I've forgotten a thing or two about reading DTDs; is the LEGEND there supposed to be mandatory? If not, then it would seem to be a Validator bug.

If it is mandatory, there are at least two other things that would need fixing. The Nu Validator does validate this page:

(perhaps a difference between DTD & Schema?)
and, the HTML 4.01 Specification, , says nothing about requiring a LEGEND in each FIELDSET (aside from quoting the DTD as above), and furthermore says, "[t]he LEGEND element allows authors to assign a caption to a FIELDSET," where "allows" seems to imply that it isn't mandatory.
Comment 1 J. Randall Owens 2013-06-15 04:56:39 UTC
I forgot to mention the other possibility I was considering, that I'm not understanding %flow; in the DTD correctly. It looks as though %flow; can be either %block; or %inline;, and %block; can be %list; among others, and %list; can be either UL or OL, of course. But like I said, I've forgotten plenty about reading DTDs.