Last modified: 2010-04-21 16:20:33 UTC
Created attachment 7154 [details]
remove html5version configuration option and related code.
in wgHtml5 mode with wgWellFormedXml off mediawiki outputs a version attribute on the html tag configurable by wgHtml5Version. This causes pages to not validate and according to w3c it is obsolete. This patch removes it.
(Unless ive missed something and there is a reason for this)?
Related: mediawiki w3c validation is currently broken. by default mediawiki installs with wghtml5 + wgwellformedxml config options on. this outputs an xhtml strict doctype. I have read simetricals comment on this in the source, but for me I would like to have html5 + markup with quotes. so well formed, but with the html5 doctype. at least it would have some chance of validating then.
well i have just seen on http://www.w3.org/TR/rdfa-in-html/ that it is needed.
"There should be a version attribute on the html element. The value of the version attribute should be "HTML+RDFa 1.0" if the document is a non-XML mode document, or "XHTML+RDFa 1.0" if the document is a XML mode document."
I'm confused though why the html5 document hasn't been updated to reflect this ?
HTML5 currently deems the version attribute to be obsolete. HTML5+RDFa currently requires it. These are two W3C specs produced by the same working group, but they have different editors, and are both still in Working Draft stage, so they disagree on this point. In practice, you should not use a version attribute if you're emitting plain HTML5, but you theoretically should if you're using HTML5+RDFa. (As far as I know this will cause validation errors regardless, because I don't think there's an HTML5+RDFa validator available right now.)
So, I'm closing this as INVALID, since the code is needed to conform to HTML5+RDFa. Please reopen if you think this is an error.
(In reply to comment #0)
> Related: mediawiki w3c validation is currently broken. by default mediawiki
> installs with wghtml5 + wgwellformedxml config options on. this outputs an
> xhtml strict doctype. I have read simetricals comment on this in the source,
> but for me I would like to have html5 + markup with quotes. so well formed, but
> with the html5 doctype. at least it would have some chance of validating then.
It does validate as-is. You just have to explicitly tell it that it's HTML5. For instance, you can use the URL http://html5.validator.nu/, or in the W3C validator, go to More Options and change Document Type to "HTML5 (experimental)".
You cannot have well-formed XML with the HTML5 doctype, unless you use no named entities other than < > ". If you think it would be better to replace all in the codebase with  , well, see if you can convince all the other devs, then get back to me.
If you want "well-formed-looking" markup but don't care if it's actually well-formed, because of stylistic preference, you're the second person who's asked for that (unless you're the same as the first?), so maybe that would be a useful feature to add for people who want validation and XML-style markup but don't care about actual well-formedness.
Anyway, this deserves another bug.