Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error triggered for the encoding <omop:uom uom="K"> based on schema https://inspire.ec.europa.eu/schemas/omop/3.0/ObservableProperties.xsd #206

Closed
iuriemaxim opened this issue Feb 5, 2020 · 5 comments
Labels
deployed in reference validator Solution deployed in production
Milestone

Comments

@iuriemaxim
Copy link

iuriemaxim commented Feb 5, 2020

While validating against Conformance Class: INSPIRE GML application schemas, General requirements the attached file (an observable property encoded based on https://inspire.ec.europa.eu/schemas/omop/3.0/ObservableProperties.xsd schema):

  1. If proving the unit of measure as
    <omop:uom uom="K"/>,
    the validator provides the following error for test gmlas.c.1: Consistency with the GML model:

    "XML document 'GRIB0-0-0.xml', ObservableProperty 'RO.METEO.OBSERVEDPROPERTY.GRIB0-0-0': The following properties of the feature have an empty value: uom, uom. While this is valid against the XML schema, this is not valid according to the GML model. Please correct the process that generates the GML documents."

However in the schema https://inspire.ec.europa.eu/schemas/omop/3.0/ObservableProperties.xsd
the unit of measure uom is declared as gml:UnitOfMeasureType, that according to the GML schema (see http://www.datypic.com/sc/niem21/t-gml32_UnitOfMeasureType.html) has an empty content.

  1. Therefore if a content is provided, such as for example
    <omop:uom uom="K">kelvin</omop:uom>,
    then the validator is triggering another error for test gmlas.b2: validate XML documents:

    "XML document 'GRIB0-0-0.xml': 18:46: cvc-complex-type.2.1: Element 'omop:uom' must have no character or element information item [children], because the type's content type is empty"

Trying other solutions to pass the tests as indicated by ATS are providing similar errors:

  1. For example if providing:
    <omop:uom uom="K" xlink:href="http://unitsofmeasure.org/ucum-essence.xml#kelvin"/>,
    the following error for test gmlas.b2: validate XML documents is indicated:

    "XML document 'GRIB0-0-0.xml': 22:93: cvc-complex-type.3.2.2: Attribute 'xlink:href' is not allowed to appear in element 'omop:uom'."

  2. Or if providing:
    <omop:uom uom="K" xsi:nil="true" nilReason="http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated"/>,
    the following error for test gmlas.b2: validate XML documents is indicated:

    "XML document 'GRIB0-0-0.xml': 40:122: cvc-elt.3.1: Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on element 'omop:uom', because the {nillable} property of 'omop:uom' is false.
    XML document 'GRIB0-0-0.xml': 40:122: cvc-complex-type.3.2.2: Attribute 'nilReason' is not allowed to appear in element 'omop:uom'
    "

Therefore it is impossible to provide the unit of measurement and the validator to tiger either an error related to XML encoding, either an error related to INSPIRE GML encoding rules .

While testing another file that has the unit of measurment encoded in a non INSPIRE WaterML 2.0 element, the content <wml2:uom code="%"/> will pass the test, as the uom is encoded as swe:UnitReference (See http://schemas.opengis.net/sweCommon/2.0/basic_types.xsd). See the attached file named FileThatIsPassingTheTests.xml

If the test is looking at the origin of the schema, either INSPIRE or either external non-INSPIRE schema, then a similar approach as the one used when testing the FileThatIsPassingTheTests.xml based on external Water ML schema should be used when testing the FileThatIsNotPassingTheTests.xml based on ObservableProperties.xsd INSPIRE schema .

Otherwise, most probably the issue is related to the post below and there are more schema having this issue with the units of measurements and in this case the schema should be corrected, or, till then, the error ”gmlas.c.1: Consistency with the GML model” should not be triggered in case of units of measurements.
https://inspire.ec.europa.eu/forum/discussion/view/217875/correction-of-the-schema-httpinspireeceuropaeuschemaspd40populationdistributiondemographyxsd-and-httpinspireeceuropaeuschemassu-core40statisticalunitcorexsd

On the other hand, because we were not able to identify any requirement that would state that each element (including omop:uom) should not be empty or should carry a URI reference to an object (@xLink:href), we would like to clarify in which TG and where exactly are written the requirements that are provided as an indication in the gmlas.c.1: Consistency with the GML model test, namely:

"Inspect each property element and verify that it either carries a URI reference to an object (@xLink:href), contains one or more object elements as child elements or contains a non-empty text node (whitespace is trimmed before checking for empty text).

Strictly, empty string values are valid according to the GML model, but they are not an appropriate value for any of the string-valued attributes in INSPIRE.

Relevant requirements:
IR Requirement Article 4 (2): Types for the Exchange and Classification of Spatial Objects. Spatial object types and data types shall comply with the definitions and constraints and include the attributes and association roles set out in the Annexes.
IR Requirement Article 4 (3): Types for the Exchange and Classification of Spatial Objects. The enumerations and code lists used in attributes or association roles of spatial object types or data types shall comply with the definitions and include the values set out in Annex II. The enumeration and code list values are uniquely identified by language-neutral mnemonic codes for computers. The values may also include a language-specific name to be used for human interaction.
Source: Abstract Test Case 'GML model', INSPIRE Data Specification Template, A.1.3, (A.6.1), A.9.5
"

If each property element should either carry a URI reference to an object (@xLink:href), or should contain one or more object elements as child elements or should contain a non-empty text, then why for the element <wml2:uom code="%"/> that is present in the FileThatIsPassingTheTests.xml, the validator is not triggering an error.

Best regards,
Iurie Maxim
Essensys Software
Romania

FileThatIsNotPassingTheTests.zip

FileThatIsPassingTheTests.zip

@danielnavarrogeo
Copy link
Contributor

Dear @iuriemaxim

We agree with you that <omop:uom uom="K"/> should be accepted as valid.

We are going to fix it and we will ask you to test it when it is ready.

Regards

@danielnavarrogeo danielnavarrogeo added ready for testing Solution provided to reporter or developed & deployed in staging (or beta), waiting for testing and removed under development labels Feb 24, 2020
@danielnavarrogeo
Copy link
Contributor

Dear @iuriemaxim

The issue has been addressed and deployed in staging environment.

Could you please check it and confirm that the issue has been fixed?

Regards

@danielnavarrogeo
Copy link
Contributor

Dear @iuriemaxim

Thank you for your feedback.

Regards

@danielnavarrogeo danielnavarrogeo added solved Solution developed and accepted, not yet deployed and removed ready for testing Solution provided to reporter or developed & deployed in staging (or beta), waiting for testing labels Feb 25, 2020
@josemasensio josemasensio added this to the v2020.1 milestone Feb 26, 2020
@danielnavarrogeo danielnavarrogeo added deployed in reference validator Solution deployed in production and removed solved Solution developed and accepted, not yet deployed labels Mar 18, 2020
@JohannaOtt
Copy link

@danielnavarrogeo Could that maybe also have fixed inspire-eu-validation/ets-repository#223?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed in reference validator Solution deployed in production
Projects
None yet
Development

No branches or pull requests

4 participants