SVG Export

Godzilla
Godzilla Global Mapper User
edited July 2008 in Technical Support
I encountered a problem when trying to open an exported SVG with Firefox (2.0.0.15).

The error message "This XML file does not appear to have any Style information associated with it" points to an erroneous xml header information.

From http://www.mozilla.org/projects/svg/faq.html):
...If there's a grey area at the top of the source with the text "This XML file does not appear to have any style information associated with it" then the problem is with the SVG file. To be valid the root <svg> tag in SVG files must have at least the following two "namespace bindings".
<svg xmlns="http://www.w3.org/2000/svg&quot;
xmlns:xlink="http://www.w3.org/1999/xlink">...this namespace binding is missing in the exported SVG file.

Additionally you can find a hint in SVG Authoring Guidelines
...Don't include a DOCTYPE declaration
XML Document Type Definitions, or DTDs for short, are a feature of XML used to validate the contents of a document. A DTD is associated with a document by placing a DOCTYPE declaration in the document. The following line is an example of an SVG DOCTYPE declaration.
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
Unfortunately the SVG DTDs are a source of so many issues that the SVG WG has decided not to write one for the upcoming SVG 1.2 standard. In fact SVG WG members are even telling people not to use a DOCTYPE declaration in SVG 1.0 and 1.1 documents...

Any suggestions to solve this problem (except "copy/paste" the correct strings to the svg file)?
Thanks a lot.

Comments

  • global_mapper
    global_mapper Administrator
    edited July 2008
    Thanks for the heads up. I have updated the SVG export to not include a DOCTYPE declaration and to add the namespace bindings to the <svg> tag. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com