Re: Support Existing Content

Gareth Hay schreef:
>> James Graham wrote:
>>
>>> What gives you the idea that all content with <!DOCTYPE HTML> (or 
>>> whatever) at the top will be "well formed"
>>
>> It won't (until pigs learn to fly); what I am arguing is that
>> for HTML5+, browsers should refuse to render non-well-formed
>> documents.  All extant (HTML 4.01-) documents would continue
>> to be renderable and rendered for the foreseeable future, but
>> w.e.f. HTML5, non-well-formed HTML5+ documents would never be
>> seen by the end user,

There are two parts of HTML5: HTML and XHTML serialisation and parsing. 
The latter of the two does exactly this. This gives authors a choice to 
pick whichever suits them best, with both having different advantages 
and disadvantages. So this is already there.

What’s different from your ideas is that the difference lies not in 
forcing people into a new model if they want to use HTML5 features, but 
still produce HTML content. This is e.g. very relevant for existing 
systems (that is, all systems that are existing now), where people want 
to add functionality without being forced into producing 100% 
well-formed XML content.

Even when a backend is made with XML in mind but does not produce and 
serialise an XML DOM on the server, it is already a bit unreliable. One 
example of this is that recently I made a post on my website (which is 
served with application/xhtml+xml) with an & in the title, and 
discovered that I forgot to add code to escape the title text. Had the 
backend been using an XML document, this could never have happened.

This problem is many times bigger for systems which were never 
specifically designed to produce well-formed XML at all, where it would 
be very unreliable to try to hack them into producing well-formed content.

The only end-result that I could see what forcing this well-formedness 
and not giving authors a choice would achieve, would be that browsers 
are subsequently forced by their consumers to stop requiring XML to be 
well-formed, because there will be many systems out there which in 
untested edge cases produce unreadable pages, which are subsequently 
filed to browser vendors as bugs.

This is not an imaginitive scenario; it has already happened to some 
extent with RSS feeds and mobile web content. If you ask me, the main 
cause of this was that site authors were forced to produce XML pages 
using backends that were never designed to do so.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.

Received on Tuesday, 1 May 2007 14:44:12 UTC