This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Consider http://validator.w3.org/check?uri=http%3A%2F%2Fwww.mozillaquestquest.com%2Fabout&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.606 The validator says "No DOCTYPE found! Checking with default XHTML 1.0 Transitional Document Type.". Since XHTML5 is allowed to be doctypeless but XHTML 1.0 is not, I would suggest to default to checking against XHTML5 instead of XHTML 1.0.
Simon, interesting question but not sure if the answer is that straightforward. Most of the books available and the practices deployed in Web agencies right now are around XHTML 1.0. Validating the document as XHTML 5 will create more errors than XHTML 1.0. There are things which are not allowed by XHTML 5 such as "meta http-equiv". If we validate with something which creates more errors, we are likely to discourage people. Plus html5 is a moving target which makes it difficult for web agencies having a contractual engagement with a customer. There's a need of a stability when validity is one of the requirements of the contract. That's the social part of validation.
Without a doctype, it's not valid XHTML 1.0 anyway, so, when passing validation on validator.w3.org is a requirement you can't be doctypeless so long as it defaults to validating against XHTML 1.0.
(In reply to comment #2) > Without a doctype, it's not valid XHTML 1.0 anyway, so, when passing validation > on validator.w3.org is a requirement you can't be doctypeless so long as it > defaults to validating against XHTML 1.0. > Simon is correct, all XHTML 1.x documents are supposed to have a doctype. This has been discussed before on the TAG mailing list where it was clarified that XHTML5 is the only (X)HTML language allowed to not have a doctype. When the W3C's validator is presented with a XHTML document served as application/xhtml+xml or application/xml it should send it over to the validator.nu part of the W3C's validator for checking as XHTML5. This of course doesn't apply to people serving documents as text/html as there's no such thing as XHTML5 served as text/html, the mime type/file ext is part of what distinguishes XHTML5 from HTML [1]. So in the case of text/html it's best just to validate the document as XHTML 1.0 transitional and tell them they need a doctype (or even better, tell them to upgrade to HTML5 :-)). [1] http://dev.w3.org/html5/spec/Overview.html#html-vs-xhtml
This seems to be working now on HEAD, although it still whines about lack of doctype and claims to be going to validate as XHTML 1.0 Transitional.
(In reply to comment #4) > This seems to be working now on HEAD, although it still whines about lack of > doctype and claims to be going to validate as XHTML 1.0 Transitional. > I've just noticed that the HEAD version is validating doctypeless text/html pages as valid HTML5 [1][2], (these pages should be treated the same as doctypeless XHTML pages were treated prior to (X)HTML5). It is *only* pages served as application/xhtml+xml or application/xml that can omit the doctype. For a page to be valid HTML5 or XHTML5 it must either have a doctype like: "<!DOCTYPE html>" or have no doctype at all and be served as application/xhtml+xml or application/xml (I'm waiting to here back from Henri regarding how we should deal with doctypeless text/xml as it's not a valid XHTML5 mime type). [1] http://dean.org.nz/temp/no-doctype/ (text/html) [2] http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fdean.org.nz%2Ftemp%2Fno-doctype%2F&charset=(detect+automatically)&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.630
(In reply to comment #5) > I've just noticed that the HEAD version is validating doctypeless text/html > pages as valid HTML5 [1][2], It says it does but if you try out new elements or something invalid you'll see that it really doesn't. > (these pages should be treated the same as > doctypeless XHTML pages were treated prior to (X)HTML5). (Why?) > It is *only* pages > served as application/xhtml+xml or application/xml that can omit the doctype. > For a page to be valid HTML5 or XHTML5 it must either have a doctype like: > "<!DOCTYPE html>" or have no doctype at all and be served as > application/xhtml+xml or application/xml (I'm waiting to here back from Henri > regarding how we should deal with doctypeless text/xml as it's not a valid > XHTML5 mime type). No, XHTML5 may have any XML MIME type and any (or no) doctype. http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#authors-using-xhtml
(In reply to comment #5) > I've just noticed that the HEAD version is validating doctypeless text/html > pages as valid HTML5 [1][2] Note that the HEAD version is in perpetual development and can, at any time, be broken. A peek at the cvs commit messages will show that Ville has been actively working on the HTML5 integration and doctype override, and running into issues there, hence some probably misbehaviour of the HEAD instance until things are figured out http://lists.w3.org/Archives/Public/www-validator-cvs/latest
Hi Simon > > (these pages should be treated the same as > > doctypeless XHTML pages were treated prior to (X)HTML5). > > (Why?) Um, well, I don't know, how do you think we should deal with text/html pages that contain the XHTML namespace? They aren't XHTML5 if they are text/html, right? But I guess the author may be trying/intending to use XHTML5. I'm not sure how this should work, I thought I had it figured out, but perhaps I didn't. > > > > It is *only* pages > > served as application/xhtml+xml or application/xml that can omit the doctype. > > For a page to be valid HTML5 or XHTML5 it must either have a doctype like: > > "<!DOCTYPE html>" or have no doctype at all and be served as > > application/xhtml+xml or application/xml (I'm waiting to here back from Henri > > regarding how we should deal with doctypeless text/xml as it's not a valid > > XHTML5 mime type). > > No, XHTML5 may have any XML MIME type I thought it was just application/xhtml+xml or application/xml, is this not correct Simon? I wish someone had corrected me earlier. > and any (or no) doctype. Yes, I agree, that is what I meant to say, I guess I didn't write it out very well sorry. > http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#authors-using-xhtml > Yeah, I've read that part of the spec many times before, but it seems I may have been wrong about the mime types. It only mentions application/xhtml+xml and application/xml so I have always thought it was just those two.
> Um, well, I don't know, how do you think we should deal with text/html pages > that contain the XHTML namespace? that's *doctypeless* text/html pages (of course)
Validating doctypeless text/html as HTML 4.01 Transitional seems fine for now although sometime in the future authors will probably expect HTML5 instead. Validator.nu defaults to HTML5.
Yes, HEAD is in a flux and quite buggy at the moment. I'm working on it and hope to get a significantly improved version to CVS later today.
The doctype dropdown menu at http://validator.w3.org/check doesn't include XHTML5 anywhere in the list (though HTML5 is). Just a thought, but it occurs to me that if we could just TELL the validator that the page to be validated was supposed to be XHTML5, by selecting XHTML5 from the dropdown menu, instead of letting it auto-detect, then we would be able to have pages checked as XHTML5, regardless of whether or not they were doctypeless. Presumably, we would then also be able to supply the select value as a GET parameter, and thereby provide a "validate this page" link for visitors to check for themselves.
Just use http://validator.w3.org/nu/ directly.
I don't see how that resolves this bug. This bug is about the behavior of http://validator.w3.org/
(In reply to comment #14) > I don't see how that resolves this bug. This bug is about the behavior of > http://validator.w3.org/ The point is that there's very little chance there is ever going to be a change in the behavior for this in the service that's currently at http://validator.w3.org/ Nobody is currently working on the code for that service. I think it's been a year or more since anybody touched the code for it. So realistically speaking, if you want an update of the current http://validator.w3.org/ code to be a solution to the use case of defaulting to XHTML5 instead of XHTML1, then you're not going to get that. The only alternative solution I can offer is to just http://validator.w3.org/nu/ directly and pretend that http://validator.w3.org doesn't exist.
OK. So WONTFIX.