Document Type Declaration CSS IE6

Emil Zegers taatuut at PLANET.NL
Tue Aug 2 02:41:24 EDT 2005


Hello Andrew,

As far as I know there is no possibility to not add the header or change
it's position in the output html at this moment.

This could be a nice enhancement. I don't know the exact reasons why the
header is put in, maybe one of the developers can respond on that.

You can however get around this by parsing the created HTML on the server
before sending it to the client.

This requires some extra work: you need the client request to be directed to
another page on the server, not directly to the mapserver. In this page
(could be php, asp etc.) you extract the needed parameters from the request
to create the request that will be send to the mapserver, for example with a
(serverside!) xmhttp request. When receiving the response (still on the
server) you can edit the html and then finally send the html back to the
client.

This might seem a bit of an overkill but will offer you some extra
flexibility too, not only for removing the header but also for adding other
possibilities.

If you search through the mail list archives you will find more info on
this.

Regards,

Emil


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Andrew L. Ross
Sent: dinsdag 2 augustus 2005 6:45
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Document Type Declaration CSS IE6


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