Re: Comments on HTML WG face to face meetings in France Oct 08

On Nov 18, 2008, at 05:29, Elliotte Harold wrote:

> Beyond error handling, a big concern I have with HTML 5 as written  
> is that it mixes together multiple layers that should be separate.  
> The object model by which one accesses a document is very different  
> from the syntax of the document, the semantics of the document, and  
> the display of the document in a particular medium. HTML 5 treats  
> these as more or less  different views of the same thing rather than  
> as separable, independent pieces that connect to but do not depend  
> on each other. A monolithic design like this is far less flexible  
> and extensible.


 From http://www.whatwg.org/specs/web-apps/current-work/#conformance-requirements
| User agents with no scripting support
|
|   Implementations that do not support scripting (or which have their  
scripting
|   features disabled entirely) are exempt from supporting the events  
and DOM
|   interfaces mentioned in this specification. For the parts of this
|   specification that are defined in terms of an events model or in  
terms of
|   the DOM, such user agents must still act as if events and the DOM  
were
|   supported.

This means that agents that do not support scripting may use a  
different object model. For example, it's conforming to implement a no- 
scripting agent with XOM as the internal object model. The  
Validator.nu HTML Parser even supports XOM out-of-the-box.

Since precision about DOM details is needed for interop of agents that  
do run scripts, it makes sense to define things by referring to the  
DOM. However, since the relationship of the DOM and the Infoset is  
understood and the relationship of the Infoset and XOM is understood,  
I didn't find the specification by reference to DOM a hardship when  
implementing XOM support for the Validator.nu HTML Parser.

The main problem was not related to a non-DOM XML object model but  
*any* XML object model: The output of the HTML5 parsing algorithm is  
not necessarily an XML 1.0 4th ed. Infoset. However, HTML5 now defines  
a coercion from DOM5 onto Infoset, and the Validator.nu HTML Parser  
implements the coercion.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Tuesday, 18 November 2008 10:14:37 UTC