[gdal-dev] Relax KML driver about xmlns

Christopher Condit condit at sdsc.edu
Wed May 20 13:34:26 EDT 2009


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
condit at sdsc.edu
(858) 822-5483





More information about the gdal-dev mailing list