Last modified: 2010-04-21 16:20:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T24590, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22590 - version attribute for html is obsolete now on html5
version attribute for html is obsolete now on html5
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-20 01:39 UTC by Jools Wills
Modified: 2010-04-21 16:20 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
remove html5version configuration option and related code. (3.05 KB, patch)
2010-02-20 01:39 UTC, Jools Wills
Details

Description Jools Wills 2010-02-20 01:39:49 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.
Comment 1 Jools Wills 2010-02-20 01:46:55 UTC
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 ?
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-04-21 16:20:33 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links