Re: [XHTML1.1] Media Types (was Error in Conformance Definition document?)

David Dorward wrote:
> On Tue, Apr 03, 2007 at 12:36:31AM +1000, Lachlan Hunt wrote:
>> XHTML 1.1 documents MUST be labelled with an XML Media Type such as 
>> application/xml [RFC3023] or application/xhtml+xml [RFC3236] and MUST 
>> NOT be labelled as text/html [RFC2854].
> 
> How does application/xhtml+xml fit with documents which:
> 
> * Have XHTML's html element as the root element but use additional
> namespaces

The MIME type isn't really useful once parsing has begun.  Namspaces are 
used for dispatching elements to the right place.

> * Use XHTML elements but have the root element from another namespace

AIUI, generally speaking, the MIME type used should be that of the host 
language, which is determined by the root element.  While authors 
probably shouldn't use application/xhtml+xml for such documents, there 
is little problem in doing so because of namespaces.

If in doubt, application/xml is always available for use.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Monday, 2 April 2007 15:39:49 UTC