XHTML header

Author Message

David Syers

Tuesday 04 November 2003 9:28:22 am

Hi

I am unsure if this is related in any way to ez, but I would have though that someon would have come accross this.

In my pagelayout template I start of the page with:

<?xml version="1.0" encoding="utf-8"?>
<!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">

This was working fine in ez, but then for some reason IE 5.5 & 6.0 now both display the results as if it where an XML page. I cannot think for the life of me what might have changed.

Alex Jones

Tuesday 04 November 2003 10:25:27 am

There is a known problem with IE when using the XML declaration and a doctype, which is quite frustrating. Try eliminating the XML declaration and moving the character encoding to a meta tag. That should fix it.

There is a pretty good discussion of this available at A List Apart: http://www.alistapart.com/discuss/doctype/ The discussion relates to the article "Fix Your Site With the Right DOCTYPE!" (http://www.alistapart.com/articles/doctype/).

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

David Syers

Wednesday 05 November 2003 6:23:04 am

Thanks for the pointer Alex.

I turns out it was after adding some code before the HTML was output. eZ was producing whitespace and IE didn't like the fact that the <?xml version="1.0" encoding="utf-8"?> was not the first line of the output.

Fixed the whitespace and IE is now happy again!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.