Message353299
The current specification as of today documents
https://dom.spec.whatwg.org/#dom-document-createelementns
If you run this in the browser console,
var nsdoc = 'http://foo.bar/zoo';
var xmldoc = document.implementation.createDocument(nsdoc, 'Zoo', null);
var cpd = document.createElementNS(nsdoc, 'Compound');
var chimp = document.createElementNS(nsdoc, 'Chimp');
cpd.appendChild(chimp)
xmldoc.documentElement.appendChild(cpd);
/* serializing */
var docserializer = new XMLSerializer();
var flatxml = docserializer.serializeToString(xmldoc);
flatxml
you get:
<Zoo xmlns="http://foo.bar/zoo">
<Compound>
<Chimp/>
</Compound>
</Zoo>
but if you run this in the browser console,
var nsdoc = 'http://foo.bar/zoo';
var xmldoc = document.implementation.createDocument(nsdoc, 'Zoo', null);
var cpd = document.createElement('Compound');
var chimp = document.createElement('Chimp');
cpd.appendChild(chimp)
xmldoc.documentElement.appendChild(cpd);
/* serializing */
var docserializer = new XMLSerializer();
var flatxml = docserializer.serializeToString(xmldoc);
flatxml
you get:
<Zoo xmlns="http://foo.bar/zoo">
<compound xmlns="http://www.w3.org/1999/xhtml">
<chimp></chimp>
</compound>
</Zoo>
which is a complete different beast.
I don't think there is an issue here. And we can close this bug safely. |
|
Date |
User |
Action |
Args |
2019-09-26 12:45:20 | karlcow | set | recipients:
+ karlcow, jkloth, Alexander.Tobias.Heinrich |
2019-09-26 12:45:20 | karlcow | set | messageid: <1569501920.52.0.749029565039.issue18182@roundup.psfhosted.org> |
2019-09-26 12:45:20 | karlcow | link | issue18182 messages |
2019-09-26 12:45:20 | karlcow | create | |
|