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

Incorrect validation error on INSPIRE vocabulary date and date type #180

Open
coravanoorschot opened this issue Sep 24, 2018 · 14 comments
Open
Assignees

Comments

@coravanoorschot
Copy link

coravanoorschot commented Sep 24, 2018

Error message:
The metadata record set has 1 record(s) with errors for this assertion.
XML document 'Geolocator-metadata_dataset_new7.xml', record '3401db4d-e04d-4514-8907-c78691e62558': The metadata record has keywords which originate from a controlled vocabulary 'GEMET - INSPIRE themes, version 1.0', but the date or date type is not correct. Date should be '2008-06-01' and date type 'publication'. The keywords are: Geographical names; Land use; Hydrography; Transport networks; Sea regions; Buildings.

This error messag is not correct, because the XML contains a correct date and date type.
ETF Validation report: http://inspire-sandbox.jrc.ec.europa.eu/etf-webapp//v2/TestRuns/EIDf6f794af-27c5-4a6e-aba8-9805a215c8a1.html
The XML is attachted in Zipfile: Geolocator-metadata_dataset_new7.zip

@OscarD31
Copy link

Same problem here. It must be something quite recent, because the same metadata file not so long ago didn't get that error.

@michellutz
Copy link

@inakidiazdecerio Could you pls look into this? Thanks.

@inakidiazdecerio
Copy link
Contributor

Dear @coravanoorschot and @michellutz,

The assertion is checking that the date is "2008-06-01", that the attribute codeListValue and text of date type element is "publication". In the example provided there is no text value, that is the reason there is an error.

See the example with the publication value:

<gmd:CI_Date>
             <gmd:date>
                      <gco:Date>2008-06-01</gco:Date>
             </gmd:date>
             <gmd:dateType>
                        <gmd:CI_DateTypeCode  codeList="./resources/codeList.xml#CI_DateTypeCode" codeListValue="publication">publication</gmd:CI_DateTypeCode>
              </gmd:dateType>
</gmd:CI_Date>

@michellutz Are you agree if we remove the check for the text value? The assertion should only check the date element is "2008-06-01" and that the code list value attribute is "publication".

@michellutz
Copy link

Yes, in my view, the test could be relaxed to check only (as also specified in TG requirement C.21 in the MD TG v2.0) that

Please, note, however, that according to section 8.5.5.1 Building blocks of the CodeList encoding in ISO/TS 19139:2007, the element should actually also have non-empty content:

The content of the element is either the name of the codelist value in the given code space or the name
corresponding to the codelist value in the default language of the metadata when the codeSpace attribute is not present.

EXAMPLE 4 Here is a full instance of CI_DateTypeCode expressed in the domaineCode code space:

<CI_DateTypeCode codeList= “http://www.tc211.org/ISO19139/resources/codeList.xml#CI_DateTypeCode” 
codeListValue="creation"  codeSpace="domainCode">0001</CI_DateTypeCode>

EXAMPLE 5 Here is a full instance of CI_DateTypeCode expressed in the default language of the metadata (e.g. English):

<CI_DateTypeCode codeList=“http://www.tc211.org/ISO19139/resources/codeList.xml#CI_DateTypeCode”
codeListValue="creation">Creation</CI_DateTypeCode> 

The XML element value ensures the user of access to a valid default expression of the actual value
of the CodeList, while the three attributes ensure the application the ability access the full definition
of the CodeList and its values, typically for customization of the user interface (creation of a drop
down box providing the registered or catalogued value of the codelist, multilingual and multicultural
management).

I guess, this is a more general issue for discussion in the 2017.4 sub-group.

@MarieLambois
Copy link

Agree with Michael. The content of codelist elements is free and can be in other languages (We often use that option in France). Only the codeListValue should be tested.

@AntoRot
Copy link

AntoRot commented Nov 14, 2018

I think that the test should check the codeListValue and that the content is non-empty regardless the value, according to the mentioned section in the ISO TS 19139. In this regard, see also the section A.11 Codelists in the MD TG v. 1.3 that recommends two ways to reference code lists: either the element value repeats the codeListValue or the element name is expressed in the default metadata language. In both cases, the content is non-empty.
e.g. In Italy the content of the code list elements is preferably expressed in Italian (but also the value of codeListValue is accepted) and is always required.
Concerning the codeList attribute, both in the XML attached and in the Italian current implementations, a value other than that one required in the mentioned TG Req C.21 is used (namely "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#CI_DateTypeCode").

@IGNCNIG
Copy link

IGNCNIG commented Nov 15, 2018

We agree with Michael and Antonio: codeListValue should be tested and the content should be non-empty regardless the value.

@thijsbrentjens
Copy link

Agreed with changing the test like @michellutz describes.

@MarcoMinghini
Copy link
Contributor

[2017.4 meeting 2018-11-15] all agree to change the test, as suggested above.

inakidiazdecerio added a commit that referenced this issue Nov 20, 2018
The check for the text value of dateType element is removed. The assertion should only check that the codeListValue attribute is "publication".
inakidiazdecerio added a commit that referenced this issue Nov 26, 2018
Modifications in the ETS to solve the issue #180
MarcoMinghini added a commit that referenced this issue Feb 1, 2019
inakidiazdecerio added a commit that referenced this issue Mar 25, 2019
The assertion checks that there is a non-empty value of the element <CI_DateTypeCode>.
@inakidiazdecerio
Copy link
Contributor

Dear @coravanoorschot,

We are happy to announce that the solution for this issue has been implemented in the INSPIRE Validator. We have prepared a testing environment with the solution. The solution passed our quality controls, but we will appreciate if you could test it before deploying it in production.

You will find the solution deployed in following link:

http://staging-inspire-validator.eu-west-1.elasticbeanstalk.com/etf-webapp/

Thanks in advance for your help.

@coravanoorschot
Copy link
Author

coravanoorschot commented Apr 15, 2019 via email

@inakidiazdecerio
Copy link
Contributor

Dear @coravanoorschot,

Thank you for your feedback. The assertion checks that the codeListValue attribute is "publication", and with the latest changes also that there is a non-empty value of the element <CI_DateTypeCode>.

If you put a value in the <CI_DateTypeCode> element (for example "publication") the test should be pass.

Regards.

@coravanoorschot
Copy link
Author

coravanoorschot commented Apr 23, 2019 via email

@inakidiazdecerio
Copy link
Contributor

Dear @coravanoorschot,

These changes were discussed in the pull request #194 (see the comment #194 (comment)).

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants