#2938 closed defect (fixed)
xsi:schemaLocation attribut in GML output
Reported by: | jezekjan | Owned by: | chaitanya |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | GML |
Cc: | h.jezek@…, warmerdam |
Description
When exporting data to GML by ogr2ogr 1.6.0 I'm getting the xsi:schemaLocation attribute like this:
xsi:schemaLocation="http://ogr.maptools.org/lineogr.xsd"
but according to the specification http://www.w3.org/TR/xmlschema-1/#schema-loc the xsi:schemaLocation attribute should contain namespace and xsd file so the output should be:
xsi:schemaLocation="http://ogr.maptools.org/ lineogr.xsd"
It seems to me that this is due to this fix http://trac.osgeo.org/gdal/changeset/9831. This bug causes an error when GML generated by ogr2ogr is being parsed by GeoTools 2.5.5.
Change History (7)
comment:1 by , 14 years ago
Cc: | added |
---|---|
Component: | default → OGR_SF |
Keywords: | GML added |
Owner: | changed from | to
comment:2 by , 14 years ago
Status: | new → assigned |
---|
jezekjan,
According to the xml specification the value should contain pairs of namespace names and schema document locations. So, shouldn't it be
xsi:schemaLocation="http://ogr.maptools.org/ http://ogr.maptools.org/lineogr.xsd"
instead of
xsi:schemaLocation="http://ogr.maptools.org/ lineogr.xsd"
follow-up: 4 comment:3 by , 14 years ago
Chaitanya, if I understand it right the second parameter is xsd document location that is usually shipped with gml so if xsd is generated to same directory as gml then file name is enough (this is the way how for example gvSig gml export works). Whole http link is usually used for general xsd (like feature.xsd) that are publicly available on the internet.
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 by , 14 years ago
jezekjan,
I tested this with GeoTools with the sample from http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/data/test_point.gml http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/data/test_point.xsd
Please reopen this ticket if you still have any problem.
Chaitanya,
Please review the specification to confirm and fix in trunk, 1.6 branch and if the problem exists there the 1.5 branch as well.