[whatwg] The problems with namespaces in text/html

Henri Sivonen hsivonen at iki.fi
Sun Nov 5 05:33:47 PST 2006


On Nov 5, 2006, at 15:12, Elliotte Harold wrote:

> Anne van Kesteren wrote:
>
>> Sorry, but the model of the web is the DOM, whether you like it or  
>> not.
>
> *The* model of the Web is not DOM.

The model in the browsers that matter is the DOM. Unfortunately. But  
it is too late to change it. And having even that level of interop is  
great.

> The map is not the world. The model is not the document. Any model  
> is just a convenient local representation. The reality of the  
> document is its text.

Actually, the reality of an (X)HTML5 document is in abstract syntax  
tree parsed out of either serialization.

In browsers that allow scripting, the tree has to be exposed via the  
DOM API and has to implement the DOM notion of the tree data model.  
But if you are writing a non-browser app that doesn't do scripting,  
you could use an HTML5 parser that emits SAX2 events and you could  
construct a XOM tree out of those. You don't need to care whether the  
SAX2 events came from an HTML5 parser or from an XML parser.

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





More information about the whatwg mailing list