Last modified: 2014-10-25 21:07:56 UTC
This is a tracking bug for problems with XHTML output compliance and compatibility.
*** Bug 2663 has been marked as a duplicate of this bug. ***
*** Bug 5830 has been marked as a duplicate of this bug. ***
*** Bug 9807 has been marked as a duplicate of this bug. ***
Given that the existing pages are flagrantly and commonly not well-formed XML, wouldn't it be better to mark them with an HTML 4.01 doctype? The XHTML DTD is an invitation to parse with an XML parser, and they can't be parsed that way. Either a document is well-formed XML or it is not. Unterminated <br> tags are not a subtle point of interpretation.
We do produce well-formed XHTML except in the presence of bugs.
Adding 'tracking' keyword.
Hello, We, at LinuxCabal, think that this is a severe bug. We should set an example and follow these international standards. If the header says XHTML 1.0 Strict, we should conform to just that. http://validator.w3.org/check?uri=http://wiki.cabal.mx/wiki/P%25C3%25A1gina_Principal&charset=(detect+automatically)&doctype=Inline&group=0 http://wiki.cabal.mx/ <- MediaWiki 1.16.0 almost vanilla install (one extension for https logins)
(In reply to comment #7) > Hello, > > We, at LinuxCabal, think that this is a severe bug. We should set an example > and follow these international standards. It looks like a configuration issue at your end. Set $wgHtml5 to false. Then you should get valid transitional xhtml. I don't know where you get the strict header from.
1.16.0 ships with an XHTML Strict header for XML well-formedness reasons. Try setting the validator manually to HTML5 and it will validate (modulo bugs): http://validator.w3.org/check?uri=http%3A%2F%2Fwiki.cabal.mx%2Fwiki%2FP%25C3%25A1gina_Principal&charset=%28detect+automatically%29&doctype=HTML5&group=0&user-agent=W3C_Validator%2F1.1 In 1.17, we switched to <!DOCTYPE html> after some fixes to ensure this doesn't break well-formedness (basically, getting rid of named entities). In 1.16, you can either set $wgWellFormedXml = false (disabling well-formedness) or $wgHtml5 = false (disabling HTML5 features) to get the doctype to match the content. In the default setup, output is valid HTML5 (modulo bugs) but has a misleading doctype. Basically, there is an issue here, but it's fixed in 1.17, so there's nothing specific for us to do at this point. The patch to remove named entities was enormous and will not be backported to 1.16. In the future, you should file new bugs on specific issues you have, not post in existing bugs -- particularly not tracker bugs.
To reiterate, 1.16.0 does *not* violate any standards here. HTML5 permits the use of an XHTML 1.0 Strict header for HTML5 content, and so 1.16.0 is obeying HTML5 (modulo bugs). The validator is reporting that the page is not valid XHTML 1.0 Strict, which is true, but it *is* valid HTML5 -- as the link I gave above demonstrates.
(In reply to comment #8) > It looks like a configuration issue at your end. Set $wgHtml5 to false. Then > you should get valid transitional xhtml. I don't know where you get the strict > header from. I did just this and still not valid: http://validator.w3.org/check?uri=http://wiki.cabal.mx/wiki/P%25C3%25A1gina_Principal&charset=(detect+automatically)&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator/1.1 Thank you for a quick reply, btw ;)
(In reply to comment #9) > 1.16.0 ships with an XHTML Strict header for XML well-formedness reasons. Try > setting the validator manually to HTML5 and it will validate (modulo bugs): > > http://validator.w3.org/check?uri=http%3A%2F%2Fwiki.cabal.mx%2Fwiki%2FP%25C3%25A1gina_Principal&charset=%28detect+automatically%29&doctype=HTML5&group=0&user-agent=W3C_Validator%2F1.1 It appeared so (before the wgHtml5 = false) but, this warning seems to negate what the validator asserts. I found the warning just bellow. "DOCTYPE Override in effect! The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">" has been suppressed and the DOCTYPE for "HTML5" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.." It seems the validator contradicts himself but, still, there's a warning; there shouldn't be one. > In 1.17, we switched to <!DOCTYPE html> after some fixes to ensure this doesn't > break well-formedness (basically, getting rid of named entities). In 1.16, you > can either set $wgWellFormedXml = false (disabling well-formedness) or $wgHtml5 > = false (disabling HTML5 features) to get the doctype to match the content. In > the default setup, output is valid HTML5 (modulo bugs) but has a misleading > doctype. > > Basically, there is an issue here, but it's fixed in 1.17, so there's nothing > specific for us to do at this point. The patch to remove named entities was > enormous and will not be backported to 1.16. In the future, you should file > new bugs on specific issues you have, not post in existing bugs -- particularly > not tracker bugs. Nice to read. When is 1.17.0 out? ;)
(In reply to comment #12) > It appeared so (before the wgHtml5 = false) but, this warning seems to negate > what the validator asserts. I found the warning just bellow. > > "DOCTYPE Override in effect! > > The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 > Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">" has been > suppressed and the DOCTYPE for "HTML5" inserted instead, but even if no errors > are shown below the document will not be Valid until you update it to reflect > this new DOCTYPE.." That's wrong. That text is correct for legacy HTML versions, which permit only one doctype, but HTML5 permits several different doctypes. Probably that validator text was written before HTML5 and never updated. > It seems the validator contradicts himself but, still, there's a warning; there > shouldn't be one. The warning is gone in 1.17, but it's only a warning, not an error. It serves to alert you to a possible problem, not to say that there definitely is one. > Nice to read. When is 1.17.0 out? ;) No planned release date.
using 1.17, I got only the following from the validator: Warning Line 27, Column 77: The language attribute on the script element is obsolete. You can safely omit it. <div id="siteNotice"><script type="text/javascript" language="JavaScript">
(In reply to comment #14) > using 1.17, I got only the following from the validator: > > Warning Line 27, Column 77: The language attribute on the script element is > obsolete. You can safely omit it. > > <div id="siteNotice"><script type="text/javascript" language="JavaScript"> Should be fixed in r77619. It's a problem with DismissableSiteNotice, not MediaWiki itself. (But you aren't supposed to mention bugs in tracking bugs, you're supposed to file a new bug and mark it blocking this.)
Should this issue be closed, as from now on, we're aiming to be HTML5-ish compliant?
We are currently supporting both and the html generation APIs are nicely abstracting the details away.
Now that we don't support XHTML 1.0 and many of the dependent bugs aren't really XHTML issues I'm making this our HTML validity tracking bug. bug 49337 will also cover things that affect our well formed XML feature.