You are correct - when IE sees the XML prologue, it thinks that it's the
doctype, and gets thrown into quirks mode.  However, having the XML prologue
after the doctype (as in your second example) isn't proper.  Per the W3C
specs, XHTML should be served as application/xhtml+xml or application/xml or
text/xml and should not be served as text/html.  Serving XHTML properly
requires the XML prologue.  However, unfortunately, most sites serve their
XHTML markup as text/html.  I've never really understood this - it's very
easy to use content negotiation to serve up HTML 4.01 as text/html to
browsers that can't handle the proper MIME type, and XHTML 1.0/1.1 as
application/xhtml+xml to those that can.  Regarding IE 7 - who knows except
the developers?
My two cents :)

Collin Davis
Web Architect
Stromberg Architectural Products
903.454.0904
e     [EMAIL PROTECTED]
w     http://www.strombergarchitectural.com
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Kennon
Sent: Thursday, March 24, 2005 9:58 AM
To: [email protected]
Subject: [WSG] XML Declaration

Hi,

I vaguely remember reading if the xml declaration position the 
following:

<?xml version="1.0" encoding="UTF-8"?>

is switched (something like this):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" >
<?xml version="1.0" encoding="UTF-8"?>
   <head>
     <title>Virtual Library</title>
   </head>
   <body>
     <p>Moved to <a href="http://vlib.org/";>vlib.org</a>.</p>
   </body>
</html>


It does not throw IE into quirks mode. Is this true, necessary and what 
standard conformance changes regarding this issue are addressed in IE 
7?:

CK
______________________________
"Knowing is not enough, you must apply;
willing is not enough, you must do."
                                        ---Bruce Lee



******************************************************
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