W3C home > Mailing lists > Public > public-webapi@w3.org > May 2008

Re: XHR LC comments

From: Julian Reschke <julian.reschke@gmx.de>
Date: Mon, 19 May 2008 09:04:00 +0200
Message-ID: <48312660.305@gmx.de>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
CC: Boris Zbarsky <bzbarsky@MIT.EDU>, "Web API WG (public)" <public-webapi@w3.org>

Bjoern Hoehrmann wrote:
> * Boris Zbarsky wrote:
>> Bjoern Hoehrmann wrote:
>>> Being able to send wf-but-ns-illformed documents would not make much
>>> sense if you couldn't also read them back in
>> Which you can, with a non-NS-aware XML parser.
> 
> My point was that the XHR draft currently requires using a namespace-
> aware one, so for both writing and reading, you would have to change
> two parts of the draft.

Bot sure. The recipient is a server which does not use XHR for parsing 
at all, right?

>> The problem is that figuring out whether a DOM fragment can usefully
>> be serialized as a ns-wellformed string is a bit of a pain.
> 
> Could you elaborate on this point? You need to serialize the document
> before starting to send it, to ensure that changes to it do not affect
> what is being sent, to set the Content-Length header, etc., and you
> can rather easily check for ns-wf during serialization if you implement
> the serialization yourself, so this does not seem like a problem. Even
> if you cannot do it during serialization, the algorithm to do it on the
> document object is relatively simple aswell.

You could implement a streaming serialization, in which case errors like 
these would only be catched when the response is already partly written 
(and no, you don't need the content length beforehand, you can always 
use Transfer-Encoding: chunked).

BR, Julian
Received on Monday, 19 May 2008 07:06:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 19 May 2008 07:06:15 GMT