Re: XHR LC comments

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 UTC