Re: Why HTML should be taught as HTML without pretending it is XML

On Jul 23, 2007, at 2:51 PM, Anne van Kesteren wrote:

> On Mon, 23 Jul 2007 23:39:31 +0200, Maciej Stachowiak  
> <> wrote:
>> [...] In the future, we'll be making all Documents support all  
>> Document interfaces including HTMLDocument and SVGDocument,  
>> regardless of content type or root element. I think HTML5 should  
>> change to require this even for XML documents (it currently  
>> requires it only for HTML documents, in the text/html sense).
> Actually, it already requires this for all Document objects: "(This  
> is the case whether or not the document in question is an HTML  
> document or indeed whether it contains any HTML elements at all.)"

What I meant is that HTML5 should require createElement to create  
elements in the HTML namespace for all documents. Right now it only  
requires it for HTML documents:

"For HTML documents, and for HTML elements in HTML documents, certain  
APIs defined in DOM3 Core become case-insensitive or case-changing, as  
sometimes defined in DOM3 Core, and as summarised or required below.  

This does not apply to XML documents or to elements that are not in  
the HTML namespace despite being inHTML documents.


The canonical form of HTML markup is all-lowercase; thus, this method  
will lowercase the argument before creating the requisite element.  
Also, the element created must be in the HTML namespace."



Received on Monday, 23 July 2007 22:00:28 UTC