[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: well-formedness error



* Paul Hoffman / IMC wrote:
>>  4 would be rejected because their MIME contained incorrect or missing
>>charset information
>
>That seems irrelevant as long as the XML received had the encoding in 
>the ?xml entry correct for the object itself.

Not really, if the Content-Type header value has a charset parameter
it determines the encoding and if the XML document is not encoded
using that encoding, the document is ill-formed. A simple example
would be

  Content-Type: application/xml;charset=us-ascii

  <?xml version="1.0" encoding="iso-8859-1"?>
  <Björn/>

The document is ill-formed as the octet 0xF6 is not allowed in
US-ASCII. The same goes for missing encoding information in the
header,

  Content-Type: text/xml

  <?xml version="1.0" encoding="iso-8859-1"?>
  <Björn/>

is also ill-formed because for text/xml the lack of a charset
parameter means that the encoding is to be determined as US-ASCII
which again does not allow octet 0xF6.