Steven,

The EMPTY element declaration in the DOCTYPE was simply inspired from the example found in the spec itself (in Annex A.2 of WMS 1.1.1 and also present in most/all previous revisions).

I'm no XML guru so I'm not sure what the best fix is, but once you find out I'd invite you to file a ticket documenting the original problem and the new format that makes MSXML and other parsers happy.

Daniel

Steven M. Ottens wrote:
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


--
Daniel Morissette
http://www.mapgears.com/

Reply via email to