Skip to main content

@DeanAtSafe

@NatalieAtSafe

Hi, I am trying to convert to my access template into a GML
3.2.1 compliant with this xsd
http://dd.eionet.europa.eu/schemas/euregistryonindustrialsites/EUReg.xsd. Our
Schema is an extension of the INSPIRE Production and Industrial Facilities
(http://cloud.epsilon-italia.it/eenvplus_new/PF.htm). After producing the GML,
I try to validate it with this GML validator (http://cloud.epsilon-italia.it:8081/teamengine/).

However, I am
receiving the following error: Error in call to extension function {public
java.lang.Object
com.occamlab.te.TECore.callFunction(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo)
throws java.lang.Exception}: Exception in extension function
net.sf.saxon.s9api.SaxonApiException: Error in call to extension function
{public javax.xml.transform.Source
org.opengis.cite.iso19136.TestNGController.doTestRun(org.w3c.dom.Document)
throws java.lang.Exception}: Exception in extension function
java.lang.RuntimeException: No xsi:schemaLocation attribute found. See ISO
19136, A.3.1. Result: Failed

Could you please be so kind and let me know, how i could
modify my fmw in order to get a valid GML?

Thank you in advance,

Valantis

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!

Reply