Alan Milnes wrote:
So does anyone have a link to an article which can tell me how to
properly serve up application/xhtml+xml using PHP?

Jeroen Visser shared
http://www.workingwith.me.uk/articles/scripting/mimetypes/ as a link
before... that tells you how. The datestamp on the message was Thu, 11
Nov 2004 01:48:36 +0100 if you want to read the original.

Thanks - unfortunately it seems to have some errors - no content type is sent and Firefox seems to have problems with it as well.

Why is the content-type not sent? What errors or warnings does PHP display? What content-type _is_ sent? What problems does Firefox have?


Some possible reasons for this script not to work:
- headers are already sent out by PHP;
- one ore more conditions are too narrow or wide (especially if regular expressions are used, as in the above example);
- your application conflicts with the output buffering in the script.


The script on the above URL is not something to just cut&paste into an exisiting PHP application. I guess it would need some tuning and work to integrate it into an exisiting site. For example, this script also buffers all PHP output to transform it into HTML4.01 for IE and other non-XHTML-savvy user agents. For most sites, you could strip that part and serve XHTML1.0 corresponding with the HTML4.01 compatibility guidelines. In that case, you only need to switch the content-type header and need not tweak the actual HTML document.

Jeroen

--
vizi fotografie & grafisch ontwerp - http://www.vizi.nl/

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to