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

Re: XHTML2 MIME type

From: Herr Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Fri, 11 Apr 2003 21:35:44 +0200
To: Toby A Inkster <tobyink@goddamn.co.uk>, Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: www-html@w3.org
Message-Id: <200304112135.48239.Christian.Hujer@itcqis.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Toby,

Am Freitag, 11. April 2003 18:40 schrieb Toby A Inkster:
> On Fri, Apr 11, 2003 at 04:01:57PM +0200, Bjoern Hoehrmann wrote:
> | Indeed, but using the XHTML 1.0 media type for incompatible XHTML 2.0
> | documents could be a major hindrance to early adopters of XHTML 2.0,
> | since it would be rather hard if not impossible to determine whether
> | the user agent supports XHTML 2.0 on the server side.

> This is already the case. The Accept header is simply not a reliable way
> of determining which user agents can handle XHTML 1.1. e.g. Opera 6 and
> above can handle it, but they don't say so in the Accept header. OTOH,
> most browsers seem to list */* in the Accept header, which suggests they
> will accept application/xhtml+xml!
>
> Currently, I just use something along the lines of:
>
> if ( ($ua =~ m/Opera.7/) || ($su =~ m/Gecko/) ) {
> 	print "Content-Type: application/xhtml+xml\n\n";
> } else {
> 	print "Content-Type: text/html\n\n";
> }
> # now send the xhtml 1.1 document
>
> It is far from ideal, but until browser start using the Accept header in
> a useful manner, it is what needs to be done.
That's really far from ideal.
AFAIK:
Currently, it's illegal to send XHTML 1.1 as text/html.
There's no RFC or TR allowing XHTML 1.1 to be sent as text/html.

> There is no reason not to extent this to XHTML 2:
>
> if ( ($ua =~ m/Opera.8/) || ($su =~ m/Gecko.2/) ) {
>         print "Content-Type: application/xhtml+xml\n\n";
> 	# and now send an xhtml 2 document
> } else if ($ua =~ m/MSIE.7/) {
>         print "Content-Type: application/xhtml+xml\n\n";
>         # and now send an xhtml 1.1 document
> } else {
>         print "Content-Type: text/html\n\n";
> 	# and now send an xhtml 1.1 document
> }
>
> (assuming Microsoft finally builds some support for XHTML into IE 7!)
And how am I supposed to do that in my .htaccess?

I don't want to say your solution is bad. It isn't bad. I like it and I 
already used it quite often myself.
But if user agents that can handle XHTML would at least properly indicate they 
do, the world would be a lot better.

It's just not practicable to wrap each HTML file with Perl, PHP, JSP, Servlets 
or whatever.


Bye
- -- 
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+lxkTzu6h7O/MKZkRAlGYAJ9rVeZe+lNt7bsChTBgGOtdQB23+gCg2QXp
6qrteeUJZImPEjKY6J8AIMc=
=YPGx
-----END PGP SIGNATURE-----
Received on Friday, 11 April 2003 15:36:38 GMT

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