2.1.2 [DOM Level 3 - Core] Section 1.3.3, XML Namespaces


The specification states:

 As far as the DOM is concerned, special attributes used for declaring XML 
 namespaces are still exposed and can be manipulated just like any other attribute. 
 However, nodes are permanently bound to namespace URIs as they get created. 
 Consequently, moving a node within a document, using the DOM, in no case results in 
 a change of its namespace prefix or namespace URI. Similarly, creating a node with 
 a namespace prefix and namespace URI, or changing the namespace prefix of a node, 
 does not result in any addition, removal, or modification of any special attributes 
 for declaring the appropriate XML namespaces. Namespace validation is not enforced; 
 the DOM application is responsible. In particular, since the mapping between 
 prefixes and namespace URIs is not enforced, in general, the resulting document 
 cannot be serialized naively. For example, applications may have to declare every 
 namespace in use when serializing a document.

Quirks Mode, IE7 Mode, IE8 Mode, and IE9 Mode (All Versions)

Special attributes for declaring namespaces that begin with "xmlns:" on the root <html> element are not supported. These attributes do not affect the namespace URI of created elements.