W3C home > Mailing lists > Public > public-html@w3.org > June 2007

Re: Versioning re-visited (was : mixed signals on "Writing HTML documents", tutorial, etc.)

From: Alexandre Alapetite <alexandre@alapetite.net>
Date: Fri, 22 Jun 2007 03:31:49 +0200
Message-ID: <42a8e2e00706211831m2f6fed3bw89c9bd6db71730a1@mail.gmail.com>
To: "Dan Connolly" <connolly@w3.org>
Cc: public-html@w3.org

Dear Dan Connolly,
I follow with a great attention the conversation regarding having a
possibility to identify in which version of (X)HTML is written a given
document:

I think the idea of having a Wiki entry on the topic
[http://esw.w3.org/topic/HTML/DocTypes02] with the most constructive
posts and arguments should be more exploited. It could be extended by
summaries such as the one from Karl Dubost
[http://lists.w3.org/Archives/Public/public-html/2007Apr/1708.html].

Here is my own memo trying to summarize the main points:

== Should HTML have a versioning system? ==

=== Against a versioning system ===
This section will be biased, since I am completely in favour of having
an explicit way to tell the version...
The arguments against a proper versioning system seems to be that:

* A versioning system will not encourage future versions of HTML to
ensure compatibility with older specifications.

* The minimal <!DOCTYPE html> is currently "good enough" to trigger
strict mode in the major browsers that do doctype switching.

* Without versioning, it is possible to take features from different
versions of HTML and mix them together in the same document.

* The concept of validity should vary over time: old documents should
become valid/invalid when the HTML recommendation(s) evolve.

* It looks nicer without a version attribute or public identifier in
the DOCTYPE.

* A version system can be re-introduced later if needed.

==== Quotes ====
Henri Sivonen:
> In that scenario, re-introducing a version number will  be a smaller problem than
> the changes requiring explicit versioning. On the other hand, if the scenario of HTML6 not
> requiring a different  version id is realized, <!DOCTYPE html> is more elegant for both
> HTML5 and HTML6.
[http://lists.w3.org/Archives/Public/public-html/2007Apr/0617.html]

Ian Hickson:
> Versioned implementations would mean that you could not just take
> a random document and add a feature from a new HTML version,
> because it might not work -- in fact, they make it impossible
> to use a feature from HTML8 and a feature from HTML9 at the same time
> if the two features are both defined differently in the two language versions.
[http://lists.w3.org/Archives/Public/public-html/2007Jun/0500.html]

Ian Hickson:
> For example, when you fix errors in the language, old documents will
> continue to have no errors reported in conformance checkers, despite the
> state of the art having advanced. (Or vice versa -- people working around
> bugs in the standard will have their documents still reported as having
> errors even though there aren't any according to the latest revision of
> hte standard.

Anne van Kesteren (Opera):
> It was "simplified" because none of the other information was needed.
> <!doctype html> is enough to trigger standards mode in existing browsers
[http://lists.w3.org/Archives/Public/public-html/2007Jun/0303.html]


=== In favour of a versioning system ===
On the other hand, I see some strong good reasons to have such as
versioning system.

The main arguments seem to be:

* An explicit version helps a browser or any reader to know the
intention of the author.

* Versioning is needed to update the HTML recommendation without
breaking existing content.

* It allows the automatic validation of the HTML documents against the
precise HTML version they are targeting.

* Allows "flavours" of HTML such as "XHTML Basic".

* A validator may advise updating to a newer version if it can
automatically tell what version was used, and another tool may provide
some help in the conversion to the newer version.

* There will be no consistency with previous HTML versions if we use
<!DOCTYPE html> for HTML 5 and need to reintroduce the public
identifier in later versions.

* A special extra knowledge will be needed to know that <!DOCTYPE
html> means HTML 5 (or any later version until a version mechanism is
re-introduced).

==== Quotes ====
Chris Wilson (Microsoft):
> The Microsoft IE team is committed to implementing standards compliance.
> At the same time, we can't change current behavior for current content.
> That paradox requires us to require authors to opt in - which they can do through
> IE-specific goo (which, as I said, I think is sub-optimal), or telling us what era of the
> implementation they wrote their content. [...].
> As for the details of version, I have to object strongly to the idea that the DOCTYPE
> for HTML5 should just be: <!DOCTYPE html>
[http://lists.w3.org/Archives/Public/public-html/2007Apr/0612.html]

David Hyatt (Apple):
> It is simply naive and foolish to expect IE to be able to add these new features
> to existing content. Anyone who proposes this has absolutely no concept of
> what it means to be backwards-compatible and to not break the Web. [...]
> it's still good language design to identify the specific language version.
> I would like the version string to be:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5.0//EN">
[http://lists.w3.org/Archives/Public/public-html/2007Apr/1408.html]

Philip Taylor:
> I argue that "validity" is a simple pass-or-fail criterion,
> and that the test of validity is the comparison of the document
> with the specification against which it claims to have been written.
> You are, I think, arguing that "validity" varies over time [...] If so,
> I regard that as a /very/ slippery slope, and one that has far more
> in common with the frequently heard suggestion that a "valid" document
> is one that renders "correctly" [...] in the author's preferred browser.
[http://lists.w3.org/Archives/Public/public-html/2007Jun/0490.html]

>From [http://www.w3.org/QA/Tips/Doctype]:
> There is not just one type of HTML, there are actually many:
> HTML 4.01 Strict, HTML 4.01 Transitional, XHTML 1.0 Strict,
> and many more. [http://www.w3.org/QA/2002/04/valid-dtd-list.html] [...]
> Why specify a doctype? Because it defines which version of (X)HTML
> your document is actually using, and this is a critical piece of information
> needed by browsers or other tools processing the document.



== DOCTYPE or @version attribute in the root ==
If there is a versioning system, the version information can be
explicitly written in the DOCTYPE or in the HTML root (there are also
a few other possibilities such as a meta or a comment).

In am personally in favour of the @version and @baseProfile attributes
(just as in SVG), with the namespace declaration in XHTML, and a
DOCTYPE with the public identifier for the non-XML HTML.

=== In favour of the DOCTYPE ===

* Triggers strict mode in some browsers.

* Can be used to identify flavours of HTML (e.g. XHTML Basic) and
documents combining languages, such as XHTML+Voice or
XHTML+MathML+SVG.

* The public identifier part of the doctype contains the FPI (Formal
Public Identifier), which is an ISO standard (ISO 8879 and ISO 9070).
See also RFC 3151 if we want an URI format. (NB: the FPI could be used
in a @version attribute also).

* Already used for many SGML/XML languages.

* Supported by most SGML/XML processing tools, browsers, editors, etc.

* Familiar system to many Web masters.

==== Quotes ====
>From [http://validator.w3.org/docs/sgml.html]:
> a DOCTYPE declaration is the most, if not the only way
> to know which markup language it should validate documents against.


=== In favour of a @version attribute in the root ===
* There is no place for a DOCTYPE when including an XHTML document
into another XML document.

* In XML, a doctype is not required for languages without DTD, and the
trend is to abandon DTD in favour of XML Schema, Relax NG, Schematron,
...

* Other W3C XML-based languages such as XSL and SVG have a @version
attribute at their root. (SVG has also a @baseProfile attribute for
flavours of SVG).

* HTML 3.2 and HTML 4 Transitional already had a @version attribute
automatically set to the same value as the doctype public identifier

==== Quotes ====
Maciej Stachowiak:
> In a compound document by inclusion (CDI) scenario,
> there is no place to put the doctype. [...] For instance:
> <svg xmlns="http://www.w3.org/2000/svg" version="1.2">
>   <foreignObject>
>     <html xmlns="http://www.w3.org/1999/xhtml/" version="5.0">
>       ...
[http://lists.w3.org/Archives/Public/public-html/2007Apr/1053.html]



Cordially,
Alexandre
http://alexandre.alapetite.fr
Received on Friday, 22 June 2007 01:31:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:01 GMT