In this group issues regarding the use of the GML application schemas are discussed.

| Share
Group discussion > Trouble validating GML Application schemas

Trouble validating GML Application schemas

Wilko Quak
3021 days ago

Hi All,

Today I downloaded the GML application schemas from the data specifications site. One of the first things I tried was testing whether these were valid xml schemas. Validation (with oXygen) fails because there are somehow duplicate <annotation> fields in the schema (with exactly the same text). After removing the duplicates schema validation goes fine. Anyone any idea what is happening here?

Thanks in advance, Wilko Quak

Permalink

Just
3008 days ago

Hi,

 

I found the same issue in all v3.0 schemas. Looks like an export issue with ShapeChange through which the schemas seem to have been generated. I removed all double annotations by hand but definitely this needs to be reported/fixed at the source. Maybe someone on this list knows the channels to report this to the INSPIRE schema authors ?

best, Just van den Broecke

Permalink

Michael Lutz
3006 days ago

There was an error in the XML schema generation that in some cases
included <annotation> elements twice which causes errors in
parsers.

This has been fixed (thanks to Clemens Portele). We will publish a new version of the GML application schemas once the changes made during the Inter-service consultation on the Implementing Rule have been incorporated into the common UML repository (hopefully before Christmas).

Permalink

momut1
30 days ago

Hi all,

I have some GML schema validation issues as well. I am quite novice in GML so bear with me on this one.

I am trying to validate a supposedly INSPIRE comliant layer I've previously made through eENVplus validation service. The process suffers total failure everytime. The error message I get is:

Test tns:Main type Mandatory default result Passed (s0003)

Assertion: The GML application schema or data set satisfies all
relevant constraints.

Form d1e46_1:
sch-uri=http://www.epsilon-italia.it/public/download/allThemes.xml
gml-uri=
gml-doc=

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: Failed to find schema reference in source: C:\TE_BASE\users\momut1\s0003\momchil.xml
Result: Failed

1. The validation service requires my GML input to be 3.2.1 version. I am exporting the layer from QGIS/GeoServer in version 3.2. Is this sufficiently equivalent to work?

2. How can it symultaneously say that "The GML application schema or data set satisfies all relevant constraint" and "Failed to find schema reference in source"? This doesn't make sense to me.

3. So then looking into my GML export more closely i find the following discrepency:

<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
     gml:id="aFeatureCollection"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation=""
     xmlns:ogr="http://ogr.maptools.org/"
     xmlns:gml="http://www.opengis.net/gml/3.2">

These are the first lines of the GML export. I notice that the field "xsi:schemaLocation=" is empty. Could this be the problem making the validator crash. It makes sense to me as the validator compares the source and target schemas between each other. So if the information concerning the schema is missing in my file, the validation service has nothing to compare its schema to. So then the question becomes - how do I export the layer so that the schema information is embeded within. Intuitively it makes sense to me that exporting a layer from a GIS/GeoServer would inherently populate the schema information, but for some reason this doesn't seem to be the case. Can anyone shed somelight on this?

4. Can someone please provide me with an INSPIRE compliant layer that they've made (preferebly in GML format) so that I may compare my layer to his/hers?

Thank you all!

Regards,
Momo

Permalink