- From: Julian Reschke <julian.reschke@gmx.de>
- Date: Sun, 18 May 2008 21:56:37 +0200
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: "Web API WG (public)" <public-webapi@w3.org>
Boris Zbarsky wrote: > Julian Reschke wrote: >> For this one I used Dom L1 methods to create this document: >> >> <foo><x:y/></foo> >> >> which isn't XMLNS-wellformed. > > I'm not sure I see the problem here, to be honest... Using the > non-namespace-aware DOM methods one can indeed create documents that > require a non-namespace-aware XML parser to roundtrip. Yes. > Since the UA has no idea what sort of XML parser is being used on the > server side, I'm not sure it makes sense to bail on attempts to > serialize such documents. In particular, if the document _is_ parsed > with a non-namespace-aware XML parser, there is no problem. That's true. But it's not what the XHR spec requires: "Serialize data into a namespace well-formed XML document and encoded using the encoding given by data.inputEncoding, when not null, or UTF-8 otherwise. Or, if this fails because the Document cannot be serialized act as if data is null." -- <http://dev.w3.org/2006/webapi/XMLHttpRequest/#send> So the spec requires silent data loss here, which I think is an extremely bad idea. BR, Julian
Received on Sunday, 18 May 2008 19:58:01 UTC