[Pmwiki-users] [XHTML] My Experiment - Final local.php setup

Patrick R. Michaud pmichaud
Sun Jul 13 09:26:59 CDT 2003


John-

This is excellent work, thanks!  I have a few observations and a few
questions...

On Sat, Jul 12, 2003 at 06:51:47PM -0500, John Feezell wrote:
> 
> xhtml reference
> http://www.w3.org/TR/2002/NOTE-xhtml-media-types-20020801/

This reference is *exactly* what I needed.  To summarize it for the 
group, XHTML documents SHOULD have a Content-Type of 
"application/xhtml+xml".  But at least one major browser (IE) 
doesn't support this yet.  Thus, the fallback position appears 
to be to use a Content-Type of "text/html" to have a browser 
render an XHTML document.  If you use "text/xml", the browser may
treat it as an XML application (IE displays it as an XML parse tree).

> $HTMLDoctypeFmt = '<?xml version="1.0" encoding="iso-8859-1"  
> standalone="no" ?>
>   <!DOCTYPE html
>   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>   <head>';
> $HTTPHeaders[] = "Content-Type: text/html; charset=iso-8859-1";

I'm curious--in the DOCTYPE, is there any particular reason for choosing
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" over the 
W3C-recommended value of "DTD/xhtml1-transitional.dtd"?
(See http://www.w3.org/TR/2000/REC-xhtml1-20000126/#docconf).

I've updated the Cookbook page to reflect the changes, information,
and suggestions John has made--see 
http://www.pmichaud.com/wiki/Cookbook/XHTMLOutput.  I've also added
a "Browser Compatibility" section to that page where we can record
browser compatibility.

Again, thanks for the excellent analysis and summary!

Pm



More information about the pmwiki-users mailing list