W3C home > Mailing lists > Public > www-validator@w3.org > February 2006

Re: rewrite engine for application xhtml+xml

From: David Dorward <david@dorward.me.uk>
Date: Wed, 01 Feb 2006 19:51:58 +0000
To: Naturally Naomi <naturallynaomi@yahoo.com>
Cc: W3C Validator <www-validator@w3.org>
Message-Id: <1138823518.4278.4.camel@cyberman.dorward.me.uk>

On Wed, 2006-02-01 at 11:28 -0800, Naturally Naomi wrote:

> Dear sir/madam,

www-validator is a mailing with more than a few sirs and madams :)

> I was wondering whether I could use the .htaccess file as described on
> http://www.xml.com/lpt/a/2003/03/19/dive-into-xml.html to serve
> application/xhtml+xml to those browser that do support it (such as
> Firefox). 

This is rather out of scope for www-validator, but here goes anyway:

While Firefox supports XHTML, it doesn't suppoer it as well as it
supports HTML. In fact, Mozilla recommend against serving XHTML to
Firefox. http://www.mozilla.org/docs/web-developer/faq.html#accept

> RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
> RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0

These conditions will serve XHTML in preference to HTML to a user agent
which accepts text/html with a quality value higher then
application/xhtml+xml (with the exception of a quality of zero for the
latter).

> Does this work with every user agent that understands XHTML and XML?
> Or only with Firefox?

That depends on the accept header the user agent sends.

> Is it a good idea to use this?

In my opinion - no.

(I read the mailing list. Please direct responses there and do not CC
me. Thank-you)

-- 
David Dorward                           <http://dorward.me.uk/>
"Anybody remotely interesting is mad, in some way or another."
                             -- The Greatest Show in the Galaxy
Received on Wednesday, 1 February 2006 19:53:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:20 GMT