Re: XHTML + <form ...> </form> BUG?

From: Liam Quinn (liam@htmlhelp.com)
Date: Sun, Sep 23 2001

  • Next message: Nick Kew: "Re: XHTML + <form ...> </form> BUG?"

    Date: Sun, 23 Sep 2001 16:29:55 -0400 (EDT)
    From: Liam Quinn <liam@htmlhelp.com>
    To: Nick Kew <nick@webthing.com>
    cc: <www-validator@w3.org>
    Message-ID: <Pine.LNX.4.33L2.0109231618180.895-100000@localhost.localdomain>
    Subject: Re: XHTML + <form ...> </form> BUG?
    
    On Sun, 23 Sep 2001, Nick Kew wrote:
    
    > On Sun, 23 Sep 2001, Liam Quinn wrote:
    >
    > > > It seems to me that this error message is not ideal: why not revert
    > > > to a message that lists the elements <input> can be contained in at
    > > > this point?
    > >
    > > Do you remember the old 'document type does not allow element "P" here;
    > > missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag'?
    >
    > My best attempt (as implemented at Site Valet) is
    >  "element %1 must be enclosed in one of %2"
    >
    > which in the above instance will expand %1 to input and %2 to
    > div,p,pre,...
    
    Yes, definitely an improvement in this case, but there are other cases
    where that error message is very confusing.  Consider the following common
    mistake:
    
    <b>
    <p>foo</p>
    <p>bar</p>
    </b>
    
    Code Valet says:
    
    element "P" must be enclosed in one of "APPLET", "OBJECT", "MAP",
    "IFRAME", "BUTTON"
    
    The W3C and WDG validators say:
    
    element "P" not allowed here; possible cause is an inline element
    containing a block-level element
    
    -- 
    Liam Quinn