[whatwg] The problems with namespaces in text/html (Was: MathML-in-HTML5)

Lachlan Hunt lachlan.hunt at lachy.id.au
Sun Nov 5 04:42:41 PST 2006

Elliotte Harold wrote:
> Lachlan Hunt wrote:
>> No, not without namespaces, just without the xmlns and QNames syntax.
>> e.g. when <math> is encountered in text/html, it appears in the DOM as 
>> <math xmlns="http://www.w3.org/1998/Math/MathML">
> That's like saying you want to have biology but without all that yucky 
> evolution silliness.
> If you don't have xmnls and xmlns:prefix then there are no namespaces, 
> period.

In XML, that is absolutely true.  However, we are talking about 
text/html only.

> I don't care what appears in the DOM. My model is not the DOM. Most 
> models are not the DOM.

Does that really matter, it's the concept that matters, not the specific 
model used.  The DOM is just a convenient model to use in discussion.

> All we have is the document's text. This is what must be defined. If 
> there are no namespaces in the text, then there are no namespaces.

Why is the specific syntax so important?  If, in HTML (not XHTML), 
<math> is defined to be interpreted as the math element in the MathML 
namespace, what difference does the syntax make in the end?  All HTML 
elements are already defined to be in the XHTML namespace without any 
xmlns in the syntax, so how is that any different?

>> We definitely don't want people thinking they can use any arbitrary 
>> xmlns in HTML.  That's what XHTML is for.
> I'm not sure why that bothers you. As long as things are well-formed, 
> what's the harm?

text/html *does not* enforce well-formedness and *never will*.  That's 
the problem!

> Existing browsers seem to deal OK and in a fairly well-defined way
> with content from arbitrary namespaces. (They ignore it.) I've taken
> advantage of this for years in my own Web pages.

Sure, in XML, that's true.  But in HTML, there currently are no 
namespaces (unless you count IE's disastrous XML Data Islands and Custom 
Tags, which also don't enforce well-formedness).

Lachlan Hunt

More information about the whatwg mailing list