Re: [xsl] XHTML html validation

Subject: Re: [xsl] XHTML html validation
From: Abel Braaksma <>
Date: Fri, 16 Feb 2007 15:01:30 +0100
John Steel wrote:
You mean the server is sending these pages as <filename>.xhtml? I added this
<mime-mapping extension=".xhtml" mime-type="text/html"/>
with no effect.

No. I don't know how you serve your pages, that depends on many factors. This mime-mapping won't help. Make sure you follow Owen's suggestion, though.

Try the following: add a file with an unknown extension in your server path, the file content must be precisely the same as the result of one of your XSLT transformations. Do the same for a file with an *.htm extension. Let's call them file1.some-ext and file2.htm.

Now, request both files from your server, through your web server (i.e., *not* directly from your local path, of course). Watch the results. Look through your web servers manual and/or search some forums. Change the settings until you see that both of the files serve the same way. If you are unsure of the content of the XHTML being conformant, try a minimal page:

  <body><p>some body</p></body>

If you use Firefox, make sure to watch the page info of the page. It must read:

Type: text/html
Render mode: Standards compliance mode
Encoding: UTF-8 (or whatever you use there)

under "Meta" you should find:
Content-Type:    text/html; charset=utf-8

which is not the preferred mimetype for xhtml, but to have your pages work in IE as well, you should stick to it (preferred are: text/application+xml or text/application+xhtml, I believe)

Once you have both file1.some-ext and file2.htm looking the same in every browser you want them to look the same in, you should propagate your changes to the server that serves your XSLT results.

Good luck!

-- Abel Braaksma

PS, all my pages start out as follows and are served as text/html, but do not have an extension (i.e are results of etc). Check if your pages look similar, but then with XHTML 1.0 Transitional, of course:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "";>
<html xmlns="";>

Current Thread