getCapabilities not valid XML (MSXML)
Steven M. Ottens
steven.ottens at GEODAN.NL
Tue Nov 13 05:16:40 PST 2007
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