W3C home > Mailing lists > Public > public-html-xml@w3.org > January 2011

Re: HTML/XML Task Force Minutes, 21 Dec 2010

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 3 Jan 2011 18:01:48 +0200
Message-Id: <3A4A2408-0976-416A-AB72-BFDEA719A9A5@iki.fi>
To: public-html-xml@w3.org
On Dec 21, 2010, at 23:37, Julian Reschke wrote:

> On 21.12.2010 22:09, Norman Walsh wrote:
>> ...
>>    Henri: The situation before the HTML5 spec is that IE was implementing DOM
>>    Level 1 so IE didn't recognize DOM Level 2 in the implementation sense.
>>    But gecko, presto, and webkit were implementing DOM Level 2.
>>    ... So in all browsers except IE, the view to the data model has been the
>>    same for years. There were inconsistencies across the XML/HTML data
>>    models, especially with respect to namespaces.
>>    ... HTML5 has codified the resolution of these inconsistencies. Now the
>>    data model is the same for XML or HTML, with a few small differences in
>>    the details.
>>    ... Once the parser is done, the data model is the same now. That's
>>    something that's an achievement of HTML5. The same approach already
>>    existed on the non-browser side.
>>    ... First tagsoup and now HTML5 conformant parsers provide the same kind
>>    of API for both XML and HTML5. So I think we've gone a long way to unify
>>    the data model.
>>    ... This means that as far as the stack goes, we've already done much of
>>    the unification. You can, for example, use an XSLT engine on HTML5 using
>>    the output of my HTML5 parser. It just works, whether the input is XML or
>>    HTML5.
>> ...
> 
> Actually, that's not entirely true. (Unless I'm missing a new development).
> 
> The HTML5 parser can be used on XML source, but it will absolutely not produce the data model you want.
> 
> So, in practice, you can't swap in a different parser, you still need to switch between the parsers based on the media type.

I didn't mean to suggest using an HTML parser on XML sources. Indeed, applications that want to consume both HTML and XML need to have an HTML parser and an XML parser and need to use the HTML parser for text/html inputs and the XML parser for XML content types.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Monday, 3 January 2011 16:02:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 3 January 2011 16:02:22 GMT