- From: Sierk Bornemann <sierkb@gmx.de>
- Date: Fri, 31 Aug 2007 14:39:07 +0200
- To: Dean Edridge <dean@55.co.nz>
- Cc: Tony Broome <tb777@samobile.net>, www-validator Community <www-validator@w3.org>
Am 31.08.2007 um 13:54 schrieb Dean Edridge: > Tony Broome wrote: >> >> This is what the validator shows when trying to validate: >> http://www.tonybroome.com/index.html >> This Page Is Valid XHTML 1.1! >> Result: >> Passed validation >> File: >> C:\Documents and Settings\Owner\My Documents\My Web Pages\index.html >> Encoding: >> iso-8859-1 >> Doctype: >> XHTML 1.1 >> Root Element: >> html >> Root Namespace: >> http://www.w3.org/1999/xhtml >> Important Warnings >> The validator has found the following problem(s) prior to >> validation, which should be addressed in priority: >> Warning Conflict between Mime Type and Document Type >> The document is being served with the text/html Mime Type which is >> not a registered media type for the XHTML 1.1 Document Type. The >> recommended media type for this document is: application/xhtml+xml >> But I have "application/xhtml+xml" in the header! I'm not working >> with Apachy or any server; just have a ministry website and want >> it to be as standards complient as possible. Is there anything I >> can do? A warning unheeded; is not, needed! >> >> Sincerely, >> >> Tony Broome >> > <meta http-equiv="Content-Type" content="application/xhtml+xml; > charset=iso-8859-1" /> is being ignored by browsers as your server > is set to "text/html" and this overrides and meta tag value. > > You should change your document to HTML4 strict, as this is > supported by all browsers. XHTML is not supported by Internet > Explorer. XHTML 1.0 is *surely* supported by Internet Explorer, as long as you serve this document with the MIME type "text/html", which surely is also allowed by the W3C XHTML 1.0 Recommendation for legacy browsers like IE, see http://www.w3.org/TR/2002/REC-xhtml1-20020801/#media with a "MAY" be used. Internet Explorer does not understand and can't handle the MIME type "application/xhtml+xml", which is recommended for use with XHTML at all, and which SHOULD be preferred for XHTML 1.0 and SHOULD be used (and no other MIME type else) for XHTML 1.1 and XHTML 2.0, see http:// www.w3.org/TR/xhtml-media-types/ for details! So, what isn't still supported by Internet Explorer, is *not* XHTML at all, but the use of the recommended MIME type for XHTML, "application/xhtml+xml". Knowing that, you have different possibilities to handle that. If you want to serve correctly, use either XHTML 1.0 and serve it as "text/html" (then even IE does understand that), or serve as "application/xhtml+xml" (then IE doesn't understand, and there must be a serverside switch or something like that), which distuingishes, which client browser is used meaning if it does understand "application/xhtml+xml" or not. If yes, serve with the recommended mimetype "application/xhtml+xml", if no, stick to "text/html". Under that circumstances, XHTML 1.1 only should be used, if that kind of switch does it work, or if all clients do accept "application/xhtml +xml", otherwise stick to XHTML 1.0. BTW.: If you serve an XHTML document as "application/xhtml+xml", you automatically serve it as an XML document and not as an SGML document, as you would do, if you serve it with "text/html". Consequentely it is useless to use a Meta element in the document à la <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />, because the XML parser doesn't attend it. It is only attended (and so necessary) in SGML mode, meaning if you serve that document as "text/html". You have to advice the *server* to serve the right mimetype, meaning "text/html" for .html-documents and "application/xhtml+xml" for documents with the recommended extension .xhtml. If you do that, you can use content negotiaqtion to serve the right document to the right browser. For details, also see XHTML 1.0 Recommendation, 5.1. Internet Media Type http://www.w3.org/TR/2002/REC-xhtml1-20020801/#media XHTML Media Types http://www.w3.org/TR/xhtml-media-types/ Serving XHTML 1.0 http://www.w3.org/International/articles/serving-xhtml/Overview Content-Negotiation Techniques to serve XHTML 1.0 as text/html and application/xhtml+xml http://www.w3.org/2003/01/xhtml-mimetype/content-negotiation Serving XHTML with the Right MIME Type588 http://www.webstandards.org/learn/articles/askw3c/sep2003/ Serving up XHTML with the correct MIME type http://keystonewebsites.com/articles/mime_type.php See also the still open and still-not-be-solved Validator Bug #785 on http://www.w3.org/Bugs/Public/show_bug.cgi?id=785 and hot discussion on this item on www-validator@w3.org. Sierk Bornemann -- Sierk Bornemann email: sierkb@gmx.de WWW: http://sierkbornemann.de/
Received on Friday, 31 August 2007 12:39:26 UTC