AW: [UMN_MAPSERVER-USERS] getCapabilities not valid XML (MSXML)

Arnd Wippermann arndw at WTAL.DE
Tue Nov 20 12:06:05 EST 2007


Hello,

I have no problem to request and parse the MapServer GetCapabilites.xml on
IE7 with "MSXML2.DOMDocument.6.0" or "MSXML2.DOMDocument.4.0". Perhaps
because I have set xmlDoc.validateOnParse = false;, but I haven't it
verified.

Mit freundlichen Grüssen

Arnd Wippermann
http://gis.ibbeck.de/ginfo/
 

-----Ursprüngliche Nachricht-----
Von: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Im
Auftrag von Steven M. Ottens
Gesendet: Dienstag, 13. November 2007 14:17
An: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: [UMN_MAPSERVER-USERS] getCapabilities not valid XML (MSXML)

Hi all,

My mapbuilder/openlayers application wasn't working on IE7, it complained
that the WMS getCapabilities doc generated by Mapserver wasn't valid XML.
I've finally tracked it down to the doctype declaration:
Mapserver produces
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE
WMT_MS_Capabilities SYSTEM
"http://schemas.opengeospatial.net/wms/1.1.1/capabilities_1_1_1.dtd"
 [
 <!ELEMENT VendorSpecificCapabilities EMPTY>  ]>  <!-- end of DOCTYPE
declaration -->

The parser removes both the <?xml ..> tag and the <!DOCTYPE ..> tag from the
XML before parsing. So normally the to-be-parsed XML text starts with:
<!-- end of DOCTYPE declaration -->
Which is a valid piece of XML
However MSXML apparently thinks that the closing > after EMPTY belongs to
the opening < before !DOCTYPE. So instead now the XML text starts with:
 ]>
Which obviously isn't valid XML and MSXML fails.

So my questions:
-Anyone else noticed this problem?
-Why is there an (empty!) ELEMENT declaration within the DOCTYPE?
-How can I remove this ELEMENT?

Regards,
Steven



More information about the mapserver-users mailing list