Re: [whatwg] The problems with namespaces in text/html

On Nov 5, 2006, at 00:23, Elliotte Harold wrote:

> Anne van Kesteren wrote:
>> On Sat, 04 Nov 2006 22:56:35 +0100, Elliotte Harold  
>> <elharo@metalab.unc.edu> wrote:
>>>> I've no idea about XForms, but the plan for MathML is that you  
>>>> can write it without bothering about namespaces, but that it  
>>>> ends up having namespaces in the DOM.
>
> Like hell it doesn't matter! A DOM doesn't travel over the network.  
> The serialized form does.

Anne is talking about the text/html serialization, which is supposed  
to be parsed using an HTML5 parser. It is a special-purpose  
alternative serialization for a subset of possible infosets--like  
RELAX NG Compact Syntax. Please ignore the superficial syntactic  
similarity to XML 1.0.

> The DOM is one possible local model used to process the document on  
> one system. My tools may or may not be based on the DOM, but  
> they're going to start by receiving an actual XML instance. We can  
> use TagSoup to fudge HTML, but if you I want to handle MathML, SVG,  
> and other things in it, That instance had better be namespace well- 
> formed, and it had better use the right names for the right things,  
> both local and qualified.

He wasn't talking about chameleon namespaces but about the absence of  
namespace *syntax* in the text/html serialization. The HTML5 parser  
is expected to put stuff in the right (non-chameleon) namespaces.

I don't think an HTML5 parser needs to synthetize qualified names.  
Let's just make the equal to local name in APIs that have a hole to  
fill. XML processing is broken anyway if the code is looking at  
qNames rather than the (namespace, local name) pair.

This isn't about chameleon namespaces. (Also I am opposed to  
chameleon namespaces.)

P.S. Since the HTML5 parsing algorithm assumes that it can require  
DOM nodes to be moved or appended higher up in the document, I don't  
expect Tag Soup to ever become a fully conforming HTML5 parser if it  
is to remain SAX streamability instead of buffering everything in a  
tree first. Chances are that users of Tag Soup will appreciate  
streamability more than interop with browsers when it comes to the  
handling of non-conforming documents.

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

Received on Saturday, 4 November 2006 22:57:17 UTC