Relax KML driver about xmlns
|Reported by:||Even Rouault||Owned by:||Even Rouault|
|Cc:||Mateusz Łoskot, condit|
Summary of a thread on gdal-dev (http://lists.osgeo.org/pipermail/gdal-dev/2009-May/020724.html)
Would it make sense to relax a bit the KML driver here  so it accepts <kml> root without xmlns attribute? One user reported to me that he is not able to read this file  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  http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/kml/kml.cpp#L268  http://mateusz.loskot.net/tmp/gdal/no-xmlns.kml
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?
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"
AFAICT, the schema version is not used anywhere in the driver, for instance, to control conditional processing, etc. So,for now, there seems to be little point to require presence of xmlns attribute.