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

XHR: sending documents

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 22 Feb 2007 09:50:33 +0100
To: public-webapi@w3.org
Message-ID: <dnlqt29fk33iet3cu4iuq8h9qahnauq8lq@hive.bjoern.hoehrmann.de>


  For send(Document) the draft says

  data must be serialized into a namespace well-formed XML document and
  encoded using the encoding given by data.xmlEncoding (the XML
  declaration), if specified, or UTF-8 otherwise. The serialization must
  include an XML declaration when the final encoding is not UTF-8 or

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.

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.

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.

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.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 22 February 2007 08:50:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:23 UTC