Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#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 warmerdam, 15 years ago

Cc: warmerdam added
Component: defaultOGR_SF
Keywords: GML added
Owner: changed from warmerdam to chaitanya

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.

comment:2 by chaitanya, 15 years ago

Status: newassigned

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"

comment:3 by jezekjan, 15 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.

in reply to:  3 comment:4 by chaitanya, 15 years ago

Replying to jezekjan:

Going ahead with the fix then.

comment:5 by jezekjan, 15 years ago

Thanks! What a fast action :-)

comment:6 by chaitanya, 15 years ago

Resolution: fixed
Status: assignedclosed

Fixed the error in the trunk (r16742), 1.6 (r16743) and 1.5 (r16744).

comment:7 by chaitanya, 15 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.

Note: See TracTickets for help on using tickets.