Bjoern Hoehrmann wrote:
No, I was simply trying to say XHR should not generate output it cannot parse itself.
I'm not sure I see why not, to be honest. But I can accept that this might be a desirable design principle in some circumstances.
DOM Level 3 Core Appendix B.1 should define how to fix the tree.
Indeed. Might be worth referencing it normatively here.
You picked a document that cannot exist when building it directly from a plain text document, so that this does not very strictly speaking roundtrip does not seem an issue to me.
Agreed; I was just pointing it out because it can easily cause developer confusion and non-interoperable results, as demonstrated.
-Boris