[whatwg] Using the HTML5 DOCTYPE as a new quirksmode switch
WHATWG
whatwg at robertdot.org
Sat Mar 10 14:51:30 PST 2007
On Mar 10, 2007, at 8:38 AM, Mihai Sucan wrote:
> There's no way to advertise the document as HTML 5, and it's
> certainly not the purpose of the specification to do so.
This is a problem. It is especially a problem now that the W3C is
working on their version of HTML 5. When I asked Ian Hickson how
WHATWG would handle divergence in the W3C spec [1], he said he
"intended to make every effort to keep the two in sync." [2] While I
appreciate his effort and I fully believe that he will do his best,
we are dealing with a body (i.e. the W3C) who have a history of
stubbornness and unwillingness to work with important members of the
community. [3] The future is still undecided, but I don't think it
is a good idea to operate under the assumption that the W3C will copy
and paste the entire WHATWG HTML 5 spec.
Even if DTDs are non-normative and antiquated in the HTML 5 spec, it
at least provides some method for authors to indicate their
intentions. If my intention was to write a document conforming to
HTML 3.2, I can use the HTML 3.2 DTD to tell anyone in the future
that I was using a certain set of elements. If browsers pay no
attention to DTDs, as WHATWG has said time and again, browsers must
be rendering "the latest and greatest" markup. If in 50 years, the
"i" element has been out of use for 40 years, and browsers stop
rendering that element and validators throw errors on that element,
the document still conforms to the DTD. It's not the author's fault
that the document doesn't perform the way it intended. Ideally, the
browser should care about DTDs.
The WHATWG HTML 5 spec provides no way to specify what version / fork
of HTML the author intended to use. Even if browsers don't pay
attention, I think it is a shame that there is no way to specify (if
for nothing else, to future-proof documents). I blogged about this
in more detail. [4]
It seems the WHATWG is staunchly against DTDs, even if it has an
appropriate use (e.g. emails in this thread talking about XML
entities). I've mulled over this awhile. Since DTDs aren't
normative in browsers, perhaps a "link" element with a
"rel=specification" and an "href=http://www.whatwg.org/specs/web-apps/
current-work/" (for example) would be a new way to say, "this is the
specification I used to create this document." It is easier to
remember than the DOCTYPE DTDs on pervious versions of HTML, and it
is much more human-readable than DTDs. It addresses my concerns, and
doesn't use DTDs.
Now, I don't know if it can be used as a quirksmode switch. The
DOCTYPE seems like an ideal place to run the switch. The problem
will be if the W3C (or some other as yet unformed working group that
decides to fork HTML) doesn't implement a DTD-less DOCTYPE. If the
switch is the WHATWG HTML5 DOCTYPE, documents authored under W3C HTML
5 spec will not render in super-standard mode. Browsers will have to
have multiple super-standards modes switches depending on what
version of HTML5 the author uses.
IE asking a working group to provide some new way to specify
standards mode doesn't make sense. That is an implementation problem
that they need to figure out. It isn't our job to write their
software. WHATWG doesn't need to bloat the spec for them. The IE
team needs to be creative and find a solution to their problem.
We're already using headers to swap between HTML and XHTML (since we
still call both .html files). Headers are for telling user agents
how to deal with content. It seems like sending a header "X-
STANDARDS-MODE: HTML5;" (or "WHATWG-HTML5" if W3C's HTML 5 is
significantly different) or setting an http-equiv meta tag to tell IE
to use their super-standards mode is cleaner and more desirable as it
doesn't bloat the spec, and should be more than enough for them. If
their standards mode for HTML5 has flaws and they need a NEW switch,
it can be changed to "X-STANDARDS-MODE: HTML6;" or whatever the
latest version of HTML is. This can be set across an entire server
in a few seconds via config files if needed, or set on a single
folder via .htaccess files. If headers are used, that also doesn't
bloat the file if is is saved on someone's HDD.
[1] http://blog.whatwg.org/w3c-restarts-html-effort#comment-2020
[2] http://blog.whatwg.org/w3c-restarts-html-effort#comment-2022
[3] http://meyerweb.com/eric/thoughts/2006/08/14/angry-indeed/
[4] http://robertdot.org/2007/03/08/html-5-whatwg-versus-w3c.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070310/781b2a4b/attachment.htm>
More information about the whatwg
mailing list