European Commission logo
INSPIRE Community Forum

schema EF | INSPIRE Validator error: Cannot find the declaration of element 'gml:FeatureCollection'

Hello, I'm harmonizing the EF Bathing Waters and appears the error below: Conformance class: INSPIRE GML application schemas, General requir Conformance class: INSPIRE GML application schemas, General requir… Failed: 1 / 6 Failed: 1 / 6 Schema validation gmlas.b.2: validate XML documents Messages “The dataset has 1 file(s) with errors for this assertion. The dataset has 1 file(s) with errors for this assertion. XML document 'teste10_18022020.gml': The file has 1 schema validation XML document 'teste10_18022020.gml': The file has 1 schema validation error(s). error(s). XML document 'teste10_18022020.gml': 1:1254: cvc-elt.1.a: Cannot find the XML document 'teste10_18022020.gml': 1:1254: cvc-elt.1.a: Cannot find the declaration of element 'gml:FeatureCollection'.” It appears that the INSPIRE Directive application schema doesn't have/ doesn't find the Feature Collection or the INSPIRE Directive application schema doesn’t correspond with INSPIRE Validator schema, is this possible, what is the problem? Can you help me please? Best regards, Leonor Queiroz.

  • Stefania MORRONE

    By Stefania MORRONE

    Hi Leonor,

    did you put the gml application schema in the <xsi:schemaLocation>?  The ETF is not able to 'see' the gml application schema unless you explicitly mention it in the <xsi:schemaLocation> and therefore is not able to find the declaration of element 'gml:FeatureCollection' .

    Add the following value pair to the <xsi:schemaLocation> and the error should disappear :

    "http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"

    Hope this helps,

    Stefania

     

  • Ana Leonor Salgueiro Vaz Queiroz

    By Ana Leonor Salgueiro Vaz Queiroz

    Hello Stefania,

     

    Thank you for your help.

    We did what you recomended but if we introduce the pair inside  the writer FME the GML passes in INSPIRE Validator, but doesn't write/generates  the points of the geometry.

    What do you recommend?

     

    Best regards,

    Leonor Queiroz. 

  • Stefania MORRONE

    By Stefania MORRONE

    Hi Leonor,

    I'd keep it simple.

    First off : I would produce the GML file without introducing the gml namespace /schema pair inside the FME writer

    Then, operate on the so-produced file.

    Two options:

    option 1: you could edit the file with an XML editor (e.g. Notepad ++) and add the required string in the <xsi:schemaLocation>

    option 2:  you could modify the FME workflow. For example: Read the GML file already produced with a text reader, use a StringReplacer to modify the  <xsi:schemaLocation> , send the output to a text file (saving it with .gml extension) .

    Of course there could be other ways, but the above should work fine.

    Hope this helps,

    Stefania 

Environmental Monitoring & Observations

Environmental Monitoring & Observations

Environmental Monitoring Facilities, Observations and Measurements