I came across a
strange issue last night while converting some XML data via an XSL template into
XHTML.
Issue 1: In the Head
section of my XHTML I had an empty script element (see below). IE refused
to load the page. FF had no problem with this.
<script type="text/_javascript_" src=""/>
To get IE past this
line in the markup I had to change the text to read:
<script type="text/_javascript_" src=""></script>
Issue 2: In
the body of my document I have an empty <div>. IE rendered the page correctly. FF didn't close the element, so my CSS didn't get implemented correctly.
<div
class="clear"/>
To allow FF to
process the div, I had to modify the line to:
<div
class="clear"></div>
I thought I
might need to add a space before the forward slash (ie. <div class="clear"
/>), but this didn't make any difference.
What's also
weird is that I have plenty of other self-closing elements in the document, but
these didn't break the
browsers.
While the problems
have both been resolved, I was just hoping there might be someone more fluent with FF & IE's processing of XHTML to explain why this occurred in
the first place.
Here's the URLs for
both pages:
http://www.lakemac.com.au/lakemac_final/pageTransformed_broken.html (breaks
in IE & FF)
Best Regards,
Paul Hempsall
Web Developer
Lake Macquarie City Council
Phone: (02) 4921-0713
Fax: (02) 4921-0566
This information is intended for the addressee only. The use, copying or distribution of this message or any information it contains, by anyone other than the addressee is prohibited by the sender.
Any views expressed in this communication are those of the individual sender, except where the sender specifically states them to be the views of Council.