W3C home > Mailing lists > Public > public-webapi@w3.org > February 2007

Re: XHR: sending documents

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 28 Feb 2007 11:44:42 +0100
To: "Robin Berjon" <robin@berjon.com>, "Bjoern Hoehrmann" <derhoermi@gmx.net>
Cc: public-webapi@w3.org
Message-ID: <op.togf4sh464w2qv@id-c0020.driveway.uu.nl>

On Mon, 26 Feb 2007 15:29:14 +0100, Robin Berjon <robin@berjon.com> wrote:
>> I would suggest to remove "(the XML declaration)" since xmlEncoding is
>> not the XML declaration, and turning it into e.g. "(as derived from the
>> XML declaration)" is unnecessarily long. The last sentence is not really
>> appropriate for XML documents, first the requirement is essentially im-
>> plied by the requirement that the result must be namespace well-formed,
>> and there are other cases where the XML declaration is required, e.g. if
>> the Document is an XML 1.1 document. I would suggest to remove this, or
>> turn it into a non-normative note clearly indicating that this is just
>> one of many requirements.
>
> +1 to removing it.

This should be addressed.


>> I think there needs to be a node clearly stating that even if you try
>> to send a HTMLDocument, it will be serialized as if it were XML.
>
> Agreed. Does the XHTML namespace get added automagically?

I rather wait with this until HTML5 is there. Although I suppose we could  
add some non-normative text hinting in that direction.


>> It might also be worth to note that on sending, the implementation takes
>> a snapshot of the document and subsequent modifications of the Document
>> during async upload are not reflected in the result.
>
> Yes, that will certainly alleviate some confusion from users who think  
> XML == DB.

This is also fixed.


>> The main flaw here however is that it may not be possible to meet the
>> requirement to create a ns well-formed document, for example, if it
>> contains a processing instruction whose data includes "?>"; it is not
>> possible to represent such a Document as an XML document. The draft has
>> to address this case.
>
> I can't think of anything useful that the UA can do on its own there,  
> I'd suggest throwing an exception (DOMError or some such).

Has anyone tested what implementations do?


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Wednesday, 28 February 2007 10:45:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:57 GMT