The following explains how to your GML both with FME and at: cite.opengeospatial.org.
Note that xsi:schemaLocation is optional, not required. So the absence of this does not make your GML invalid. While validators may use xsi:schemaLocation to find the schema to use for the validation, usually they also give you the option of uploading or providing a url reference to your application schema rather than only using xsi:schemaLocation.That said here is how to configure the GML writer to write the xsi:schemaLocation. This GML writer parameter requires a uri url pair, not just a url. Enter the following into Target xsi:schemaLocation:
'
http://dd.eionet.europa.eu/euregistryonindustrialsites http://dd.eionet.europa.eu/schemas/euregistryonindustrialsites/EUReg.xsd'
This represents the uri url pair associated with the EUReg namespace. This adds the following to the namespace header:
'xsi:schemaLocation="
http://dd.eionet.europa.eu/euregistryonindustrialsites http://dd.eionet.europa.eu/schemas/euregistryonindustrialsites/EUReg.xsd">'
When I did this the GML had no schema errors but I still saw some SRS errors. This is because there was no destination coordinate system set. To correct this simply set: GML writer coordinate system to EPSG:4326
GML srsName to: urn:ogc:def:crs:EPSG::4326 GML SRS Axis order to: 2,1
(EPSG:4326 is provided as an example only - you can decide which CRS is best for your data) With this the FME GML output will validate via cite.opengeospatial.org. I have attached the associated gml and test result here. Note that online validators can be tricky to work with as they need to be able to access all the referenced xsd's. Often it can be easier to configure validation locally. You can use a third party tool such as XML Spy. Or you can validate with FME's XMLValidator. This calls an independent third party library from Apache called Xerces. So you can be assured that if this passes then your GML is valid according to the referenced schema. For an example of an XMLValidator workflow see the attached XMLValidator.fmw and log.
euregistry-fmevalidation.zip
The following explains how to your GML both with FME and at: cite.opengeospatial.org.
Note that xsi:schemaLocation is optional, not required. So the absence of this does not make your GML invalid. While validators may use xsi:schemaLocation to find the schema to use for the validation, usually they also give you the option of uploading or providing a url reference to your application schema rather than only using xsi:schemaLocation.That said here is how to configure the GML writer to write the xsi:schemaLocation. This GML writer parameter requires a uri url pair, not just a url. Enter the following into Target xsi:schemaLocation:
'
http://dd.eionet.europa.eu/euregistryonindustrialsites http://dd.eionet.europa.eu/schemas/euregistryonindustrialsites/EUReg.xsd'
This represents the uri url pair associated with the EUReg namespace. This adds the following to the namespace header:
'xsi:schemaLocation="
http://dd.eionet.europa.eu/euregistryonindustrialsites http://dd.eionet.europa.eu/schemas/euregistryonindustrialsites/EUReg.xsd">'
When I did this the GML had no schema errors but I still saw some SRS errors. This is because there was no destination coordinate system set. To correct this simply set: GML writer coordinate system to EPSG:4326
GML srsName to: urn:ogc:def:crs:EPSG::4326 GML SRS Axis order to: 2,1
(EPSG:4326 is provided as an example only - you can decide which CRS is best for your data) With this the FME GML output will validate via cite.opengeospatial.org. I have attached the associated gml and test result here. Note that online validators can be tricky to work with as they need to be able to access all the referenced xsd's. Often it can be easier to configure validation locally. You can use a third party tool such as XML Spy. Or you can validate with FME's XMLValidator. This calls an independent third party library from Apache called Xerces. So you can be assured that if this passes then your GML is valid according to the referenced schema. For an example of an XMLValidator workflow see the attached XMLValidator.fmw and log.
euregistry-fmevalidation.zip
It works fine now! Thanks a lot for your valuable support!