It’s just data

Inch by Inch

Ian Hickson: I’ve changed the spec to allow a (meaningless) “xmlns” attribute on the root <html> element, for the same reasons /> is allowed on void elements now. I don’t think it’s a particularly useful thing, but I’m curious to see what people think. (Like anything in the spec, we might remove it in due course, based on real world experiences with the spec.)

Outstanding.


I hope it gets removed, it’s just completely useless!  There’s not even a valid use case for having it, it’s just giving into illogical community pressure.

Posted by Lachlan Hunt at

Lachlan, I think there is a valid use case: making it easier to use an XML toolchain to produce & target HTML5 and have it be valid.  For a specific use case, look at use the XML format for JSPs for Java web developers: [link]

So the use case is:

1) I’m a Java Developer who wants the tool support of the XML format for writing JSPs.
2) I want to target HTML5 because I don’t want the draconian error handling of XHTML.

Anything that makes it easier to write the HTML5 as well-formed XML prevents me from having to escape it and treat it as CDATA in my XML tool.  I think that allowing the trailing slash is much more important (without that I would have to escape out from my tool for all void elements to be able to emit valid HTML5), but the xmlns attribute could be helpful as well possible to some tools, and since it doesn’t hurt...

Posted by Stephen Duncan Jr at

I agree with Stephen here.  Being able to use the DOM NS functions (createAttributeNS, createElementNS, getElementsByTagNameNS, etc.) are quite nice indeed for outputting and inputting XHTML into a toolchain.  Not to mention XSLT.

Posted by Josh Peters at

Link: A lovely summary of the XHTML issue

Link: A lovely summary of the XHTML issue On the WHATWG mailing list, Henri Sivonen put together a marvelous and concise summary of the whole problem with XHTML in today’s world, and why XHTML advocates usually irritate me. I’m not going to quote...

Excerpt from Chris's Wiki :: blog at

The danger of validating your XHTML

The danger of validating your XHTML The danger of validating XHTML is that the validation is almost certainly not doing what you believe it’s doing. The problem is that all the common online validators ignore the HTTP Content-Type of what your web...

Excerpt from Chris's Wiki :: blog at

Add your comment