Opened 14 years ago

Closed 14 years ago

Last modified 14 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


When exporting data to GML by ogr2ogr 1.6.0 I'm getting the xsi:schemaLocation attribute like this:


but according to the specification the xsi:schemaLocation attribute should contain namespace and xsd file so the output should be:

xsi:schemaLocation=" lineogr.xsd"

It seems to me that this is due to this fix 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, 14 years ago

Cc: warmerdam added
Component: defaultOGR_SF
Keywords: GML added
Owner: changed from warmerdam to 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, 14 years ago

Status: newassigned


According to the xml specification the value should contain pairs of namespace names and schema document locations. So, shouldn't it be


instead of

xsi:schemaLocation=" lineogr.xsd"

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

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

Replying to jezekjan:

Going ahead with the fix then.

comment:5 by jezekjan, 14 years ago

Thanks! What a fast action :-)

comment:6 by chaitanya, 14 years ago

Resolution: fixed
Status: assignedclosed

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

comment:7 by chaitanya, 14 years ago


I tested this with GeoTools with the sample from

Please reopen this ticket if you still have any problem.

Note: See TracTickets for help on using tickets.