- From: Philip Taylor <pjt47@cam.ac.uk>
- Date: Wed, 05 Aug 2009 15:11:59 +0100
- To: martin@weborganics.co.uk
- CC: Manu Sporny <msporny@digitalbazaar.com>, RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
Martin McEvoy wrote: > > ... > > Is there anything wrong with using xmlns: in the way I have proposed > above? as I am unsure of what the Issues may be?, I think structure an > content are more clearly defined....? also xmlns is not depreciated in > html5 so really what's the cost? HTML 5 (in its text/html serialisation) currently doesn't allow xmlns: to be used in that way. The only thing it allows is xmlns="http://www.w3.org/1999/xhtml" on an HTML element, and a few special cases in inline MathML/SVG content. Anything else is invalid. It's unlikely that HTML 5 would allow xmlns: (or any other attribute name containing a colon) in valid documents, because it would either encourage violation of the "DOM Consistency" principle (http://www.w3.org/TR/html-design-principles/) or would risk violating "Support Existing Content". (Web browsers parse xmlns:prefix="..." in text/html as an attribute with local name "xmlns:prefix" in no namespace, whereas XML parsers give it local name "prefix" in the XMLNS namespace, hence the DOM inconsistency (which affects namespace-aware DOM APIs, CSS selectors, etc), so people should be discouraged from using syntax with unexpected behaviour like that, to avoid making the language more confusing than it already is; and changing text/html parsers to be consistent with XML would break some current pages that rely on the current behaviour.) -- Philip Taylor pjt47@cam.ac.uk
Received on Wednesday, 5 August 2009 14:12:35 UTC