Re: [w3c/DOM-Parsing] XML null namespaces need to be preserved (#47)

With the current specification, XMLSerializer emits ```xmlns=""``` if you do ```serializeToString()``` for ```<html>``` or ```<head>```, and no ```xmlns=""``` if you specify ```<people>```.   Because ```<people>``` and ```<people xmlns="">``` have equivalent meanings, you would have troubles only if you specify ```<people>``` and wrap the serialized result with another serialized element in another namespace.

Anyway, I understand web authors want to ask XMLSerializer to keep the original serialized representation or DOM representation as much as possible.  We might want to change the meaning of [ignore namespace definition attribute](https://w3c.github.io/DOM-Parsing/#dfn-ignore-namespace-definition-attribute) flag so that XMLSerializer ignores default namespace declarations only if their values are inconsistent with element's namespace.

Chrome<=73, Firefox, and Safari keep such default namespace declarations, Edge and IE don't.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/DOM-Parsing/issues/47#issuecomment-471847595

Received on Tuesday, 12 March 2019 03:56:40 UTC