Skip to content

Commit

Permalink
Modifications in the ETS to solve the issue #180
Browse files Browse the repository at this point in the history
The assertion checks that there is a non-empty value of the element <CI_DateTypeCode>.
  • Loading branch information
inakidiazdecerio committed Mar 25, 2019
1 parent 08bf74c commit bb1e1c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,11 @@
<TranslationTemplate language="en" name="TR.invalidDateForThesaurusGemet">XML document '{filename}', record '{id}': 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: {keywords}.</TranslationTemplate>
</translationTemplates>
</LangTranslationTemplateCollection>
<LangTranslationTemplateCollection name="TR.emptyDateTypeCode">
<translationTemplates>
<TranslationTemplate language="en" name="TR.emptyDateTypeCode">XML document '{filename}', record '{id}': The metadata record has keywords which originate from a controlled vocabulary 'GEMET - INSPIRE themes, version 1.0', but the gmd:CI_DateTypeCode element is empty. The keywords are: {keywords}.</TranslationTemplate>
</translationTemplates>
</LangTranslationTemplateCollection>
<LangTranslationTemplateCollection name="TR.noTypeFromSpatialDataServiceType">
<translationTemplates>
<TranslationTemplate language="en" name="TR.noTypeFromSpatialDataServiceType">XML document '{filename}', record '{id}': Every service metadata record must have a service type that is one of the codes from the code list at {url}. Found: {type}.</TranslationTemplate>
Expand Down
5 changes: 4 additions & 1 deletion metadata/iso/ets-md-iso-bsxets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Source: <a href="http://inspire.ec.europa.eu/id/ats/metadata/1.3/iso-19115-19119
Pre-requisite conformance classes:
<ul><li><a href="http://inspire.ec.europa.eu/id/ats/metadata/1.3/xml-encoding" target="_blank">Conformance Class 'XML encoding of ISO 19115/19119 metadata'</a></li></ul>]]></description>
<reference>../../inspire-md-bsxets.xq</reference>
<version>0.2.7</version>
<version>0.2.9</version>
<author>interactive instruments GmbH</author>
<creationDate>2016-08-30T00:00:00Z</creationDate>
<lastEditor>interactive instruments GmbH</lastEditor>
Expand Down Expand Up @@ -1272,6 +1272,8 @@ let $messages :=
local:addMessage('TR.noKeywordFromINSPIREThemes', map { 'filename': local:filename($record), 'id': $rid, 'url': $inspireThemesCodeListURL, 'keywords': fn:string-join($relevantDescriptiveKeywordsBlocks/gmd:keyword/*/text(),'; ') })
else if (not($hasExpectedDate)) then
local:addMessage('TR.invalidDateForThesaurusGemet', map { 'filename': local:filename($record), 'id': $rid, 'keywords' : fn:string-join($relevantDescriptiveKeywordsBlocks/gmd:keyword/*/text(),'; ') })
else if (string-length(normalize-space($relevantDescriptiveKeywordsBlocks/gmd:thesaurusName/*/gmd:date/*/gmd:dateType/*/text())) = 0) then
local:addMessage('TR.emptyDateTypeCode', map { 'filename': local:filename($record), 'id': $rid, 'keywords' : fn:string-join($relevantDescriptiveKeywordsBlocks/gmd:keyword/*/text(),'; ') })
else ()
)[position() le $limitErrors]
} catch * {
Expand All @@ -1286,6 +1288,7 @@ return
<translationTemplates>
<translationTemplate ref="TR.noKeywordFromINSPIREThemes"/>
<translationTemplate ref="TR.invalidDateForThesaurusGemet"/>
<translationTemplate ref="TR.emptyDateTypeCode"/>
<translationTemplate ref="TR.recordsWithErrors"/>
</translationTemplates>
</TestAssertion>
Expand Down

0 comments on commit bb1e1c1

Please sign in to comment.