Bug 19496 - XHTML documents treated as "tag soup"
XHTML documents treated as "tag soup"
Status: RESOLVED WORKSFORME
Product: Validator
Classification: Unclassified
Component: check
HEAD
All All
: P2 normal
: ---
Assigned To: This bug has no owner yet - up for the taking
qa-dev tracking
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-12 07:07 UTC by Rafał Wrzeszcz
Modified: 2013-04-21 02:41 UTC (History)
1 user (show)

See Also:


Attachments
Subject document. (2.48 KB, application/xhtml+xml)
2012-10-12 07:07 UTC, Rafał Wrzeszcz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Wrzeszcz 2012-10-12 07:07:03 UTC
Created attachment 1227 [details]
Subject document.

As far as i know XHTML documents can have short tags for <script> element (eg. <srcipt type="application/javascript" src="/script.js"/>). However validator yelds that this element has no close tag.

"Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag."

Page is served as application/xhtml+xml with (X)HTML5 Doctype.
Comment 1 Michael[tm] Smith 2012-10-24 07:49:10 UTC
To validate XHTML5 and HTML5 documents, please use the W3C Nu validator directly:

  http://validator.w3.org/nu/

If you use that you'll see that it parses your document as XML/XHTML as expected, and finds no errors.

The cause of the behavior you're seeing with the existing W3C validator is that it ignores the fact that you're serving the document with a application/xhtml+xml MIME type; it just hands the documebt off to Nu validator backend without also passing on the mime type information.

There's nothing I can do to fix this on the Nu validator side, so I'm moving it back to the previous component.

Ville, I can't remember now whether we discussed this previously, or whether this is something that's fixable in the Perl code. But if it's possible in the case of "application/xhtml+xml" documents to have the code pass the "parser=xml" option to the Nu backend, that should fix it.
Comment 2 Michael[tm] Smith 2013-04-21 02:41:24 UTC
This bug is stale now. Regardless, I don't think there behavior of the legacy validator is going to be changed any time soon. Nobody is currently maintaining it. Please just always use http://validator.w3.org/nu/

There really is no value in using the legacy http://validator.w3.org at this point. You can even use http://validator.w3.org/nu/ for HTML4 documents if you want.