W3C home > Mailing lists > Public > www-html-editor@w3.org > July to September 2004

XHTML FAQ: please remove application/xml + XSLT hack

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 16 Jul 2004 20:09:40 +0200
To: www-html-editor@w3.org
Message-ID: <410419db.105255008@smtp.bjoern.hoehrmann.de>

Dear HTML Working Group,

  In http://www.w3.org/MarkUp/2004/xhtml-faq.html#ie you write:

[...]
  Does Microsoft Internet Explorer accept the media type
  application/xhtml+xml?

  No. However, there is a trick that allows you to serve XHTML1.0
  documents to Internet Explorer as application/xml.

  Include at the top of your document the line in bold here:

  <?xml version="1.0" encoding="iso-8859-1"?>
  <?xml-stylesheet type="text/xsl" href="copy.xsl"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[...]
  Although you are serving the document as XML, and it gets parsed as
  XML, the browser thinks it has received text/html, and so your XHTML
  1.0 document must follow many of the guidelines for serving to legacy
  browsers.

  Your XHTML document will continue to work on browsers that accept
  XHTML 1.0 as application/xml.
[...]

I must ask you to remove this suggestion from the FAQ. It is flawed
because

  * it breaks in Internet Explorer 5.x without MSXML 3.0 installed
    in replace mode

  * it breaks in Internet Explorer 6.x with reasonable security
    settings that would prohibe the cross site access required
    to fetch the document type definition

  * it is generally a bad idea to deliver XHTML documents using the
    application/xml MIME type as explained in RFC 3236 section 2

  * it breaks progressive rendering

  * it wastes tremendous amounts of system resources as the browser
    would first have to fetch the document type definition and then
    transform every document instead of just rendering it as the
    resource is retrieved; even if the document type definition is
    cached at some point, the browser would still emit four GET
    requests for every document to get 304 status

  * it encourages the use of unregistered MIME types

  * it does not prevent clients that actually support XHTML as
    application/xml and XSLT to transform the document too, which
    again wastes resources

  * it breaks scripts that use CDATA sections to escape content
    as the CDATA section would be lost during the transformation

  * it encourages use of illegal XHTML documents as the result of
    the transformation would not have a document type declaration

  * it breaks content that relies on the encoding of the referring
    document to determine the encoding (such as HTML documents...)
    as the transformation result would be UTF-16 encoded and thus
    such content would be assumed to be UTF-16 encoded which it
    most likely ain't

  * it breaks content that relies on one-pass white-space processing
    in attribute values

  * it encourages the use of a .xml file name extension for XHTML
    documents which yields in more text/xml content on the web,
    which is a bad thing as everyone else is trying to wipe that
    type out

  * and so on...

while providing absolutely no benefit for the user and no meaningful
benefit for the author. Authors would read such a section in an official
XHTML FAQ as an official suggestion on how to do things, and I do not
see why anyone would encourage creating such a mess, so, please remove
that section.

regards.
Received on Friday, 16 July 2004 14:10:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:51 UTC