I've verified that the KML driver only looks for a known version (2.0, 2.1, 2.2), but doesn't make any other use of it, so we could reasonably implement Christopher's proposal : "if the document element _is_ kml and the version _is not_ found or not recognized OGR issues a warning and proceeds as if the KML were 2.2"
Le Wednesday 20 May 2009 19:34:26 Christopher Condit, vous avez écrit : > Hi Mateusz- > > > Would it make sense to relax a bit the KML driver here [1] so it > > accepts <kml> root without xmlns attribute? > > The problem is that the KML schema had many iterations before becoming > an OGC standard and in some cases those schema changes are not backward > compatible. The namespace exists to alert the client as to which version > of the schema to expect. However - I'm not sure what portion of the > schema that OGR uses actually changed. > > > One user reported to me that he is not able to read this file [2] > > using OGR KML driver and I found this is because of missing xmlns in > > <kml> root element. The KML was produced by some unknown > > software shipped with some GPS logger. > > > > I'm wondering if there are more KML generators in use that > > produce <kml> element without xmlns attribute. > > I see your point here. I think the onus is the software generating the > KML as it is part of the specification. How about this: if the document > element _is_ kml and the version _is not_ found or not recognized OGR > issues a warning and proceeds as if the KML were 2.2? > > -Chris > > Christopher Condit > [email protected] > (858) 822-5483 > > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
