Skip to content

Commit

Permalink
Formatter / EU-DCAT-AP / Improve shacl validation status - license an…
Browse files Browse the repository at this point in the history
…d status.
  • Loading branch information
fxprunayre committed Dec 14, 2023
1 parent 26297e2 commit 0871113
Show file tree
Hide file tree
Showing 5 changed files with 333 additions and 288 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
Usage note: Information about licenses and rights MAY be provided for the Resource. See also guidance at 9. License and rights statements.
-->
<xsl:template mode="iso19115-3-to-dcat"
name="iso19115-3-to-dcat-license"
match="mdb:identificationInfo/*/mri:resourceConstraints/*[mco:useConstraints]/mco:otherConstraints
|mdb:identificationInfo/*/mri:resourceConstraints/*[mco:useConstraints]/mco:useLimitation">
<dct:license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:adms="http://www.w3.org/ns/adms#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:tr="java:org.fao.geonet.api.records.formatters.SchemaLocalizations"
exclude-result-prefixes="#all">

<!--
Expand All @@ -18,7 +19,21 @@
<xsl:template mode="iso19115-3-to-dcat"
match="mri:status">
<adms:status>
<skos:Concept rdf:about="{concat($isoCodeListBaseUri, */@codeListValue)}"/>
<skos:Concept rdf:about="{concat($isoCodeListBaseUri, */@codeListValue)}">
<xsl:if test="$isExpandSkosConcept">
<xsl:variable name="codelistKey"
select="*/@codeListValue"/>
<xsl:variable name="parentName"
select="local-name(*)"/>

<xsl:for-each select="$languages/@iso3code">
<xsl:variable name="codelistTranslation"
select="tr:codelist-value-label(tr:create('iso19115-3.2018', current()), $parentName, $codelistKey)"/>

<skos:prefLabel xml:lang="{current()}"><xsl:value-of select="$codelistTranslation"/></skos:prefLabel>
</xsl:for-each>
</xsl:if>
</skos:Concept>
</adms:status>
</xsl:template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all">
<xsl:param name="expandSkosConcept" select="'true'"/>
<xsl:param name="isExpandSkosConcept" select="xs:boolean($expandSkosConcept)"/>

<xsl:variable name="europaPublicationBaseUri" select="'http://publications.europa.eu/resource/authority/'"/>
<xsl:variable name="europaPublicationCorporateBody" select="concat($europaPublicationBaseUri,'corporate-body/')"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
Gouvernement wallon le 19 septembre 2005.
</dct:description>
<adms:status>
<skos:Concept rdf:about="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#onGoing"/>
<skos:Concept rdf:about="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#onGoing">
<skos:prefLabel xml:lang="fre">Mis à jour continue</skos:prefLabel>
</skos:Concept>
</adms:status>
<dct:creator>
<rdf:Description>
Expand Down
Loading

0 comments on commit 0871113

Please sign in to comment.