Document Type Declaration CSS IE6

Andrew L. Ross rummage_bin at YAHOO.COM
Tue Aug 2 00:45:21 EDT 2005


Hi, I'm a relative newbie to Mapserver so perhaps I'm missing something simple.
Anyway, I have an MS4W type installation on a windows xp development server.
I've had no trouble getting GIS data to display coherently from a wep page
like this:

<img src="[img]" />

In order to then format the web page using CSS style declarations (I've
placed these between the <head> tags) I have to use a Document Type
Declaration (DTD).  This stuff:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>

The problem starts when Mapserver adds its own header at the beginning of
the template it submits to the browser.  I'm talking about this:

<!-- MapServer version 4.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->

Well, as it turns out Internet Explorer 6 goes into "Quirks Mode" as soon as
you add anything in front of the DTD (Mozilla based browsers have no
problems with this).  As a result all that beautiful CSS formating goes
right out the window for IE.

I am positive that this is the case because I pulled the source from the
browser, manually removed the Mapserver header and resubmitted that file
back to IE, sure enough everything worked perfectly.

So, does anyone know of a way in which I can tell Mapserver not to place its
header at the begining of the HTML template when it submits it to the browser?

Any advice will be greatly appreciated,
Andrew



More information about the mapserver-users mailing list