DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Site Building & Maintenance

Reply
 
Thread Tools Display Modes
Old 08-05-2006, 04:31 AM   #1
Bo Aakerstrom
Member
 
Bo Aakerstrom's Avatar
 
Join Date: Mar 2005
Location: Derby,UK
Posts: 1,321
Default Problems with the XML Prolog?

It is recommended by the W3C that we insert the XML Prolog at the top of the page when writing XHTML documents:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
Doing this seems to cause problems in MSIE 6 ( it will render the page in quirks mode instead of standards mode) Not adding it will cause the page to be served as HTML instead of XML.

Not sure what the implications of all this is in reality, but would like to understand what I am doing and why before I embark on editing my pages!

   
__________________
www.boaakerstrom.com
Behance Portfolio
Bo Aakerstrom is offline   Reply With Quote
Old 08-05-2006, 08:46 AM   #2
bmann
Member
 
Join Date: May 2006
Location: Minneapolis, Minnesota
Posts: 192
Default

I'm not a website developer by any means but I stumbled across this on Wikipdedia:

Quote:
Additionally, a web page which does not include a DOCTYPE at all will render in quirks mode.

One notable exception to this is Microsoft's Internet Explorer 6 browser, which will render a page in quirks mode if the DOCTYPE is preceded by an XML declaration, regardless of whether a full DOCTYPE is specified. Thus an XHTML page which begins with the following code would be rendered in quirks mode by IE 6:

<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Microsoft's Chris Wilson has indicated that the problem with the XML declaration will be fixed in version 7 of Internet Explorer, in which the XML prolog will simply be ignored [1], but for maximum compatibility with existing and older web browsers the World Wide Web Consortium, which maintains the XHTML specification, recommends that authors of XHTML documents omit the XML declaration when possible.

Internet Explorer 6 will also render HTML 4 pages with a DOCTYPE in quirks mode if a URL for the DTD is not provided.
http://en.wikipedia.org/wiki/Quirks_mode
bmann is offline   Reply With Quote
Old 08-05-2006, 10:29 AM   #3
Kelvyn
Staff
 
Kelvyn's Avatar
 
Join Date: Feb 2005
Location: In the Heart of the English Lake District
Posts: 1,381
Default

Concensus amongst commercial developers is to leave out the XML prolog and just leave the DTD. The problem is fixed in IE7.

   
__________________
Kelvyn

Web site design, hosting and marketing, Keswick in the UK Lake District

If you are planning a visit to Keswick then try Keswick Tourist Information website

Kelvyn is offline   Reply With Quote
Old 08-05-2006, 01:23 PM   #4
Bo Aakerstrom
Member
 
Bo Aakerstrom's Avatar
 
Join Date: Mar 2005
Location: Derby,UK
Posts: 1,321
Default

Left it out before asking and will continue to do so after as well.
Microsoft's solution (to ignore it) isn't really much of a solution though!

   
__________________
www.boaakerstrom.com
Behance Portfolio
Bo Aakerstrom is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Design problems ???? PeterArnel Print Production & Automation 13 10-03-2006 09:28 AM
Print CSS Problems dthomsen8 Web Site Building & Maintenance 9 02-20-2006 06:06 AM


All times are GMT -8. The time now is 07:04 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.