W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: [XHR] What mime types should trigger XML parsing?

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 23 Apr 2006 12:25:54 -0700
Message-Id: <15BA70A6-FA03-4663-89FF-609A0C420526@apple.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>

On Apr 23, 2006, at 12:12 PM, Bjoern Hoehrmann wrote:

> * Maciej Stachowiak wrote:
>> Should this be taken to mean that for any other Content-Type,
>> implementations MUST NOT attempt to parse as XML? If so, please say
>> that. Optionally allowing XML parsing for types not specifically
>> mentioned would be bad for interoperability.
> It should say that implementations use intrisinc knowledge derived  
> from
> the media type registration to determine whether or not the type  
> used to
> label the entity body is an XML media type, persumably one that is  
> meant
> to be used for complete document entities rather than other  
> entities as
> those cannot yield in a Document.

What about media types that are not registered?

> We might optionally want to require that the corresponding types in  
> RFC 3023 and any type that follows the
> +xml convention is recognized as XML document in accord with RFC 3023.
> It would not make much sense for a user agent to specifically not re-
> cognize specific media types as representing XML documents for the  
> pur-
> poses of XHR processing when the user agent does that everywhere else.

I think at minimum we need to require some baseline set of types, or  
it will be hard to write interoperable application code. I would  
rather list the full set of types considered to be xml. Given the  
widespread adoption of the +xml convention, the list of additional  
types would be relatively short.

However, if you propose that the implementation MAY parse any other  
media type as XML if it has any reason to think it is XML, then the  
spec should say that too.

>> Of these, I only know for sure that text/xsl is in common use for
>> sending XML content, even though it is unofficial and technically
>> illegal.
> Not following the +xml convention is not technically illegal.

Not because it fails to follow the +xml convention but because it is  
unregistered and not an experimental or vendor type; because there is  
an alternate type registered which is the official type; and because  
it is under the text media type even though generally it is not  
useful to view the contents as plain text. "technically illegal" is  
probably not the best way to express that. In any case, the point is  
that it is in use and this won't go away.

Received on Sunday, 23 April 2006 19:26:07 UTC

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