Opened 7 years ago

Closed 7 years ago

#7063 closed defect (invalid)

GML xsi:schemaLocation confusion

Reported by: Kurt Schwehr Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords: gml xml xsi expat
Cc:

Description

Looking at what ogr2ogr writes for schemaLocation is confusing and what the tests have is often weird with spaces in the name an files that certainly don't exist on maptools.org. e.g.

xsi:schemaLocation="http://ogr.maptools.org/ ogr_gml_55.xsd"

I'm guessing this doesn't really matter as most parsers will not try to fetch the non-existent xsd, but this can't be correct. What should be in that field so that if a parser were to try to validate it, it would have some hope? Or can we leave the field out or put in something that will short circuit looking for it?

And the space?

r24481 introduced maptools.org

Running ogr2ogr -f gml point.gml point.geojson yields:

<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://ogr.maptools.org/ point.xsd"
     xmlns:ogr="http://ogr.maptools.org/"
     xmlns:gml="http://www.opengis.net/gml">
  <gml:boundedBy>
    <gml:Box>
      <gml:coord><gml:X>100</gml:X><gml:Y>0</gml:Y></gml:coord>
      <gml:coord><gml:X>100</gml:X><gml:Y>0</gml:Y></gml:coord>
    </gml:Box>
  </gml:boundedBy>
                                                                                                                                                            
  <gml:featureMember>
    <ogr:point fid="point.0">
      <ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>100,0</gml:coordinates></gml:Point></ogr:geometryProperty>
    </ogr:point>
  </gml:featureMember>
</ogr:FeatureCollection>

Change History (2)

comment:1 by Even Rouault, 7 years ago

xsi:schemaLocation="http://ogr.maptools.org/ ogr_gml_55.xsd" is perfectly correct. This means that the schema for namespace URI "http://ogr.maptools.org/" is in "ogr_gml_55.xsd"

comment:2 by Even Rouault, 7 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.