Opened 13 years ago

Last modified 13 years ago

#3272 new bug

KML export is malformed

Reported by: onyxfish Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.7.0
Component: Project Loading / Saving Version: 1.5.0
Keywords: kml export schema Cc:
Must Fix for Release: No Platform: OS X
Platform Version: Awaiting user input: no

Description

The first four rows of an layer exported as KML read as follows:

<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document><Folder><name>test</name>
<Schema name="test" id="test">
...

The <Schema> element is not a valid child of <Folder>. It should be a child of <Document>.

As documented here: http://code.google.com/apis/kml/documentation/kmlreference.html#folder http://code.google.com/apis/kml/documentation/kmlreference.html#schema

This doesn't by itself cause any rendering issues, but if a <Style> declaration is added after the <Schema> (which is normally correct) the styles will fail to render.

Change History (1)

comment:1 by Barryrowlingson, 13 years ago

There's a handy KML validator here:

http://www.kmlvalidator.org/validate.htm

which spots the Schema nesting problem and also points me to the OGC standard which says the type has to be like type="xsd:string", whereas qgis is generating type="string". Fixer might want to fix this too. Even the Google KML examples don't have this!

Note: See TracTickets for help on using tickets.