SVG Export
Godzilla
Global Mapper User
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"
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">
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.
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"
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">
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
-
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
Categories
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 181 Announcement and News
- 941 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 580 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 111 Global Mapper Forum Website
