Opened 21 years ago

Last modified 21 years ago

#250 closed defect (fixed)

[OGR-GML] Need a way to turn off schema validation

Reported by: Daniel Morissette Owned by: Daniel Morissette
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

By default, the Xerces schema validation is turned on in 
GMLReader::SetupParser().  Unfortunately many GML files carry invalid schema 
references and this makes it impossible to open the files.

In this specific case, I use OGR/GML to load output from WFS servers in 
MapServer, and the output from the Cubeserv WFS, and from the MapServer WFS both 
don't validate in Xerces, so I had to hack my copy of the GML driver to set the 
validation to false.

What can we do about this?  Can we have a way to control whether validation will 
be turned on or off before we call open()?  Or is this validation used at all by 
anyone?  Maybe we should just turn it off by default?

Change History (3)

comment:1 by warmerdam, 21 years ago

Daniel, 

I think it would be fine to have schema validation turned off by default.
I would like to have this controlled by an #ifdef that can be enabled from
the makefile in that directory.  Do you want to make this change or me?

comment:2 by Daniel Morissette, 21 years ago

I'll make this change.

comment:3 by Daniel Morissette, 21 years ago

Done and committed to CVS.

XML validation is now disabled by default, and -DOGR_GML_VALIDATION=1 can be 
used in the ogr/ogrsf_frmts/gml/ makefile to turn validation back on.  
I also included a comment about this in both the Unix and Windows makefiles.
Note: See TracTickets for help on using tickets.