This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19496 - XHTML documents treated as "tag soup"
Summary: XHTML documents treated as "tag soup"
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2012-10-12 07:07 UTC by Rafał Wrzeszcz
Modified: 2013-04-21 02:41 UTC (History)
1 user (show)

See Also:

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

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:

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

There really is no value in using the legacy at this point. You can even use for HTML4 documents if you want.