xhtml website showing as xml - Help!Help!!

xhtml website showing as xml - Help!Help!!

Post by Jackieman » Thu, 31 Jul 2003 23:55:59


Hi,

This message was initially posted as Help!Help!!Help!!! in the General Info forum, but Murray asked me to repost it here.

My site (www.tarbert.info) is up and running but some visitors could not view the page. What they saw was only the XHTML code, (Just as we see the source code of a page). My site has valid xhtml, valid css, a touch of dhtml and javascript. I received the above complaint from three visitors to the site (www.tarbert.info gets over 20,000 hits per month). One gentleman was kind enough to get in touch with me when I requested further info. Various things were tried eg refreshing the page, clearing the cache, clearing the history, disabling the antivirus programme, etc, but nothing worked. The gentleman did tell me that he is using Windows 98, IE version 6.0.2800.1106

I could not solve this problem, and I asked for help in the General Info forum. Now I know the answer, Murray asked me to repost it here for discussion.

Regards.

Jackie
 
 
 

xhtml website showing as xml - Help!Help!!

Post by Jackieman » Fri, 01 Aug 2003 16:57:52

Hi Murray,

The answer turned out to be a simple one. Just one look at the info sent by email by the gentleman was enough. Here is what he was viewing in his browser:

"tarbet.info";
local news, travel, and all the essential information for people wanting to
visit Tarbert and the surrounding areas in Argyll, Scotland" />
local festivals, local info, business, history, travel, lochgilphead,
ardrishaig, argyll, loch fyne, scotland, TARBERT" />
/>
src="tarberttext/scriptsnfuncts/junable.js" type="text/javascript"
xml:space="preserve" />
rel="stylesheet" type="text/css" />
src="tarberttext/scriptsnfuncts/n4reloadpage.js" type="text/javascript"
xml:space="preserve" />
src="tarberttext/scriptsnfuncts/preloadimages.js" type="text/javascript"
xml:space="preserve" />

The question is: Why win 98, IE 6.0.2800.1106 should throw up the page as xml file whereas the other IE versions were able to view the page properly?

However, to keep IE 6.0.2800.1106 happy one has to make sure the lines of code stay in their proper position. The problem is more likely to occur if one converts the code into a template and then tries to enter Description and Keywords.

Regards.

Jackie

 
 
 

xhtml website showing as xml - Help!Help!!

Post by Murray *TM » Fri, 01 Aug 2003 20:35:51

ackie:

It's likely that the combination of DTD and other lines at the top of the
head are the problem.

Change this -

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html (View Source for full doctype...)>
<html xmlns="http://www.w3.org/1999/xhtml">

to this -

<!DOCTYPE html (properly configured transitional doctype...)>

and see what happens.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.DreamweaverFAQ.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Jackiemann" < XXXX@XXXXX.COM > wrote in message
news:bgai5v$m84$ XXXX@XXXXX.COM ...
by email by the gentleman was enough. Here is what he was viewing in his
browser:
to
xml file whereas the other IE versions were able to view the page properly?
code stay in their proper position. The problem is more likely to occur if
one converts the code into a template and then tries to enter Description
and Keywords.


 
 
 

xhtml website showing as xml - Help!Help!!

Post by Jackieman » Sat, 02 Aug 2003 16:34:39

Hi Murray,

Thanks, I have brought those changes in the code as you suggested. Just to check if it works, I have also reverted to the previous code, on one page, that was giving the problem. It is working perfectly on my local machine, and on my test machine using old Netscape the first line of code used to appear which has also disappeared.

So far so good but the real test would be when the person using Windows 98, IE version 6.0.2800.1106 loads the page. I should hear from him by tomorrow and I shall inform you how it went. I have to sort it out before August 4 when we go on three weeks holidays.

Regards.

Jackie
 
 
 

xhtml website showing as xml - Help!Help!!

Post by Gary Whit » Sun, 03 Aug 2003 01:07:29


Because of a bug in IE, if ANYTHING appears before the DOCTYPE, it throws IE
into quirks mode. I've not seen that cause the particular problem you
describe, but I would suggest you remove the XML prolog from the document.
The XML prolog is the first line in your page:

<?xml version="1.0" encoding="iso-8859-1"?>

The XML prolog is recommended, but not required by the XHTML specs and, due
to the buggy way that IE handles it, most people omit it. The page will
still validate and it will render much better in IE. Unfortunately, I cannot
say whether or not it will help with your problem.

Gary
 
 
 

xhtml website showing as xml - Help!Help!!

Post by Jackieman » Sun, 03 Aug 2003 03:55:00

Hi Gary,

Thanks for the tip, xml prolog will no longer appear at the top.

Murray *TMM* suggested removing the first three lines of code and replacing them with <!DOCTYPE html (properly configured transitional doctype...)>, that did not work.

I just have to keep <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> just below the <title> </title>. It works!

Regards.

Jackie
 
 
 

xhtml website showing as xml - Help!Help!!

Post by Gary Whit » Sun, 03 Aug 2003 04:46:56


You're welcome.



replacing them with <!DOCTYPE html (properly configured transitional
doctype...)>, that did not work.
charset=iso-8859-1"/> just below the <title> </title>. It works!


Yes! You should always have the meta with the content type and charset. I
must have missed the fact that it wasn't there.

Gary
 
 
 

xhtml website showing as xml - Help!Help!!

Post by Jackieman » Sun, 03 Aug 2003 05:31:40

Hi Gary,

The meta with the content type and charset is there, but it was below the Description and Keywords. Its only the win 98, IE 6.0.2800.1106 which does not like it, all other versions of ie6 render the pages perfectly. Its odd but I have learnt something new!

Regards.

Jackie
 
 
 

xhtml website showing as xml - Help!Help!!

Post by Gary Whit » Sun, 03 Aug 2003 05:55:47


Description and Keywords. Its only the win 98, IE 6.0.2800.1106 which does
not like it, all other versions of ie6 render the pages perfectly. Its odd
but I have learnt something new!

Glad you found a solution.

Gary