Re: Re: False-positive validation errors

"Lucas Gonze" <[email protected]>
Newsgroups gmane.emacs.nxml.general
Message-ID <[email protected]>
On Tue, Aug 19, 2008 at 6:27 PM, Edward O'Connor <[email protected]> wrote:
> Correct me if I'm wrong, but I think nxml is correct: the above is
> invalid HTML 4.01. <form> requires block children; your form needs a
> <p>, <div>, or (better yet) a <fieldset> to contain your <label> and
> <input>.

This is XHTML 1.0 Transitional, though.

The W3C validator does flag the missing block element if the form is
part of an HTML 4.01 document, but doesn't flag it in an XHTML 1.0
Transitional document.  To check whether this is an error in the
validator I looked up the DTD and didn't find the same requirement as
HTML 4.01, and I didn't see this requirement documented in the spec.
It's possible that I missed it.

> lucas gonze wrote:
>
>> Labels and inputs in forms are incorrectly flagged as invalid. In this
>> valid sample document, the label and input will be considered errors
>> and will cause nxml-mode to do stop doing useful validation:
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml">
>>   <head><title></title></head>
>>   <body>
>>     <form action="" method="get">
>>       <label for="inputname">Label for field: </label>
>>       <input type="text" name="inputname" id="inputname" />
>>     </form>
>>   </body>
>> </html>
>
> Correct me if I'm wrong, but I think nxml is correct: the above is
> invalid HTML 4.01. <form> requires block children; your form needs a
> <p>, <div>, or (better yet) a <fieldset> to contain your <label> and
> <input>.
>
>
> Ted
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.