W3C home > Mailing lists > Public > www-validator-cvs@w3.org > June 2013

[Bug 22372] New: 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

From: <bugzilla@jessica.w3.org>
Date: Sat, 15 Jun 2013 04:43:20 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-22372-169@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22372

            Bug ID: 22372
           Summary: 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
    Classification: Unclassified
           Product: Validator
           Version: 1.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Parser
          Assignee: dave.null@w3.org
          Reporter: jrowens.w3@ghiapet.homeip.net
        QA Contact: www-validator-cvs@w3.org

Test case:
http://validator.w3.org/check?uri=http%3A%2F%2Fhtdr.e-junkie.com%2Fadmin%2Ffieldset_test.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices
If Bugzilla has a problem with the URL more than a line long, shortened:
http://tinyurl.com/lekusql
http://preview.tinyurl.com/lekusql 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 -->
<!ATTLIST FIELDSET
  %attrs;                              -- %coreattrs, %i18n, %events --
  >

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

<!ATTLIST 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:
http://validator.w3.org/nu/?showsource=yes&doc=http%3A%2F%2Fhtdr.e-junkie.com%2Fadmin%2Fsimple_test_html.php

(perhaps a difference between DTD & Schema?)
and, the HTML 4.01 Specification,
http://www.w3.org/TR/html4/interact/forms.html#h-17.10 , 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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Saturday, 15 June 2013 04:43:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:55 UTC