W3C home > Mailing lists > Public > www-html@w3.org > May 2003

Re: XHTML2 MIME type

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 14 May 2003 23:02:09 +0300
To: www-html@w3.org
Message-Id: <F2122508-8646-11D7-80D6-003065B8CF0E@iki.fi>

On Monday, May 12, 2003, at 01:26 Europe/Helsinki, Ernest Cline wrote:

> Henri Sivonen wrote:
>> I expect a browser that supports a language that is an application of
>> XML to parse that language using a conforming XML-processor with no
>> special casing introduced at the XML processor level.
>
> If that were the intent, then why have any of the application/*+xml
> MIME types. We could have just application/xml.

The '+xml' MIME types make an assertion about the application[1] of XML 
used. When namespaces aren't used, the MIME type could be used to map 
the element and attribute names to their meanings. When namespaces are 
used, the '+xml' types only seem to make an assertion about the "host 
language", which could in theory to some limited extent be useful with 
traditional Accept header-based content negotiation.

> I expect a user agent
> which accepts application/xhtml+xml to be aware of certain things
> including the entities that XHTML1 uses.

Déjà vu: Remember how the HTML spec made a normative reference to SGML 
and then went on to make statements about things that are in 
jurisdiction of the SGML spec?

The way an XML processor becomes aware of named entities is in the 
jurisdiction of the XML spec.

A conforming XML processor provides a service: A byte stream conforming 
to XML is put in and a tree comes out. (The tree does not need to be 
represented as an in-memory tree structure [as with the DOM] but the 
service can provide a sweeping view of the tree [as with SAX].) What 
the tree means is up to an application[1] of XML to define, but how the 
byte stream is parsed into the tree is up to the XML spec to define.

The whole point of making a markup language an application[1] of XML is 
to allow applications[2] to use a general-purpose off-the-shelf 
component for getting a data structure (the document tree) out of a 
byte stream. The good thing is that applications[2] that support 
multiple applications[1] of XML can use one parser for all of them 
instead of requiring purpose-built parsers for each language.

If a language that purports to be an application[1] of XML chooses to 
require special-casing at the parsing level, the language is something 
that only looks like XML but isn't and you can't use the service 
provided by a conforming XML processor, which would be a shame and 
would defeat the purpose of making a language an application of XML in 
the first place.

Surely it would be a bad thing if HTTP required a slightly modified 
version of TCP and you couldn't use the general-purpose TCP service 
provided by the OS.

[1] in the sense of a language using XML as the base syntax
[2] in the sense of a program using the XML processor service

-- 
Henri Sivonen
hsivonen@iki.fi
http://www.iki.fi/hsivonen/
Received on Wednesday, 14 May 2003 16:02:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:55 GMT