Skip to content

Commit

Permalink
Formatter / DCAT / Applicable legislations
Browse files Browse the repository at this point in the history
https://semiceu.github.io/DCAT-AP/r5r/releases/3.0.0/#applicableLegislation

Add the element to DCAT-AP base. Element is 0..n in DCAT-AP and should be present in extensions
(mobility, hvd, geodcat).

HVD requires at least http://data.europa.eu/eli/reg_impl/2023/138/oj and
cardinality is 1..n.

Do not restrict to a particular legislation list. A sample vocabulary is
provided but it can be extended depending on catalogue domains.
  • Loading branch information
fxprunayre committed Sep 30, 2024
1 parent 60f6e98 commit 0fa0dd3
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0"
xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:xlink="http://www.w3.org/1999/xlink"
exclude-result-prefixes="#all">

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,9 @@
<xsl:variable name="hvdCategoryThesaurusKey"
select="'http://data.europa.eu/bna/asd487ae75'"/>

<xsl:variable name="hvdApplicableLegislationThesaurusKey"
select="'http://data.europa.eu/r5r/applicableLegislation'"/>

<xsl:variable name="euHvdDataCategories"
select="document('vocabularies/high-value-dataset-category.rdf')"/>

<xsl:variable name="euHvdApplicableLegislation"
select="document('vocabularies/high-value-dataset-applicable-legislation.rdf')"/>


<xsl:template mode="iso19115-3-to-dcat-resource"
match="mdb:MD_Metadata">
<xsl:call-template name="iso19115-3-to-dcat-ap-resource"/>
Expand Down Expand Up @@ -93,53 +86,16 @@


<!--
applicable legislation Legal Resource 1..* The legislation that mandates the creation or management of the Data Service. For HVD the value MUST include the ELI http://data.europa.eu/eli/reg_impl/2023/138/oj.
As multiple legislations may apply to the resource the maximum cardinality is not limited. P
-->
<xsl:template mode="iso19115-3-to-dcat"
match="mri:descriptiveKeywords[*/mri:thesaurusName/*/cit:title/*/@xlink:href = $hvdApplicableLegislationThesaurusKey]">
<xsl:for-each select="*/mri:keyword[*/text() != '']">
applicable legislation Legal Resource 1..* The legislation that mandates the creation or management of the Data Service.
**For HVD the value MUST include the ELI http://data.europa.eu/eli/reg_impl/2023/138/oj.**
As multiple legislations may apply to the resource the maximum cardinality is not limited.
<xsl:variable name="legislation"
as="xs:string?"
select="current()/*/text()"/>
<xsl:variable name="applicableLegislation"
select="$euHvdApplicableLegislation/rdf:RDF/*[skos:prefLabel/normalize-space() = $legislation]"/>
<xsl:if test="$applicableLegislation">
<dcatap:applicableLegislation rdf:resource="{$applicableLegislation/@rdf:about}">
<!--<eli:LegalResource>
<xsl:for-each select="$applicableLegislation/skos:prefLabel[@xml:lang = $languages/@iso2code]">
<dct:title xml:lang="{@xml:lang}">
<xsl:value-of select="."/>
</dct:title>
</xsl:for-each>
<xsl:for-each select="$applicableLegislation/skos:scopeNote[@xml:lang = $languages/@iso2code]">
<dct:description xml:lang="{@xml:lang}">
<xsl:value-of select="."/>
</dct:description>
</xsl:for-each>
</eli:LegalResource>-->
</dcatap:applicableLegislation>
</xsl:if>
</xsl:for-each>
</xsl:template>
See DCAT-AP
applicable legislation Legal Resource 0..* The legislation that mandates the creation or management of the Catalog.
<xsl:template mode="iso19115-3-to-dcat"
match="mri:resourceConstraints/mco:MD_LegalConstraints/mco:reference">
<xsl:variable name="href"
select="*/cit:title/*/@xlink:href"/>
<xsl:if test="$href">
<dcatap:applicableLegislation rdf:resource="{$href}">
<!--<eli:LegalResource>
<xsl:for-each select="*/cit:title">
<xsl:call-template name="rdf-localised">
<xsl:with-param name="nodeName" select="'dct:title'"/>
</xsl:call-template>
</xsl:for-each>
</eli:LegalResource>-->
</dcatap:applicableLegislation>
</xsl:if>
</xsl:template>
To create valid HVD document, a keyword anchor or a title href of mri:resourceConstraints/mco:MD_LegalConstraints/mco:reference
in the ISO record MUST define the ELI http://data.europa.eu/eli/reg_impl/2023/138/oj.
-->


<xsl:template mode="iso19115-3-to-dcat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
xmlns:dct="http://purl.org/dc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#">
<skos:ConceptScheme rdf:about="http://data.europa.eu/r5r/applicableLegislation">
<dct:title xml:lang="en">High-value dataset applicable legislations</dct:title>
<dct:title xml:lang="fr">High-value dataset applicable legislations</dct:title>
<dct:description xml:lang="fr">Législation sectorielle qui prescrit la création ou la gestion de la distribution
de données HVD
<dct:title xml:lang="en">EU applicable legislations</dct:title>
<dct:title xml:lang="fr">Législations applicables dans l'UE</dct:title>
<dct:description xml:lang="fr">Législation sectorielle qui prescrit la création ou la gestion de la ressource.
Liste non exhaustive.</dct:description>
</dct:description>
</skos:ConceptScheme>
<skos:Concept rdf:about="http://data.europa.eu/eli/reg_impl/2023/138/oj">
Expand Down Expand Up @@ -569,4 +569,4 @@
relative à la qualité des eaux destinées à la consommation humaine (refonte)
</skos:scopeNote>
</skos:Concept>
</rdf:RDF>
</rdf:RDF>
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0"
xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/2.0"
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0"
xmlns:mmi="http://standards.iso.org/iso/19115/-3/mmi/1.0"
xmlns:mrl="http://standards.iso.org/iso/19115/-3/mrl/2.0"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:adms="http://www.w3.org/ns/adms#"
xmlns:dcatap="http://data.europa.eu/r5r/"
xmlns:dct="http://purl.org/dc/terms/"
exclude-result-prefixes="#all">

Expand Down Expand Up @@ -209,6 +211,34 @@
</xsl:template>



<!--
applicable legislation Legal Resource 0..* The legislation that mandates the creation or management of the Dataset.
-->
<xsl:template mode="iso19115-3-to-dcat"
match="mri:descriptiveKeywords/*/mri:keyword[starts-with(*/@xlink:href, 'http://data.europa.eu/eli')]"
priority="20">
<dcatap:applicableLegislation rdf:resource="{*/@xlink:href}"/>
</xsl:template>

<xsl:template mode="iso19115-3-to-dcat"
match="mri:resourceConstraints/mco:MD_LegalConstraints/mco:reference">
<xsl:variable name="href"
select="*/cit:title/*/@xlink:href"/>
<xsl:if test="$href">
<dcatap:applicableLegislation rdf:resource="{$href}">
<!--<eli:LegalResource>
<xsl:for-each select="*/cit:title">
<xsl:call-template name="rdf-localised">
<xsl:with-param name="nodeName" select="'dct:title'"/>
</xsl:call-template>
</xsl:for-each>
</eli:LegalResource>-->
</dcatap:applicableLegislation>
</xsl:if>
</xsl:template>


<!--
[o] theme Concept 0..* A category of the Dataset. A Dataset may be associated with multiple themes. https://w3c.github.io/dxwg/dcat/#Property:resource_theme
Vocabulary http://publications.europa.eu/resource/authority/data-theme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mdb="http://standards.iso.org/iso/19115/-3/mdb/2.0"
xmlns:mcc="http://standards.iso.org/iso/19115/-3/mcc/1.0"
xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
xmlns:mrl="http://standards.iso.org/iso/19115/-3/mrl/2.0"
xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0"
xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/2.0"
xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0"
xmlns:lan="http://standards.iso.org/iso/19115/-3/lan/1.0"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dct="http://purl.org/dc/terms/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,7 @@
</dcat:theme>
<dcat:keyword xml:lang="fre">Mobilité</dcat:keyword>
<dcat:keyword xml:lang="fre">Observation de la terre et environnement</dcat:keyword>
<dcat:theme>
<skos:Concept rdf:about="http://data.europa.eu/eli/reg/2014/1143/oj">
<skos:prefLabel xml:lang="fre">1143/2014</skos:prefLabel>
</skos:Concept>
</dcat:theme>
<dcatap:applicableLegislation rdf:resource="http://data.europa.eu/eli/reg/2014/1143/oj"/>
<dct:accessRights>
<dct:RightsStatement rdf:about="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations"/>
</dct:accessRights>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,7 @@
</dcat:theme>
<dcat:keyword xml:lang="fre">Mobilité</dcat:keyword>
<dcat:keyword xml:lang="fre">Observation de la terre et environnement</dcat:keyword>
<dcat:theme>
<skos:Concept rdf:about="http://data.europa.eu/eli/reg/2014/1143/oj">
<skos:prefLabel xml:lang="fre">1143/2014</skos:prefLabel>
</skos:Concept>
</dcat:theme>
<dcatap:applicableLegislation rdf:resource="http://data.europa.eu/eli/reg/2014/1143/oj"/>
<dct:accessRights>
<dct:RightsStatement rdf:about="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations"/>
</dct:accessRights>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,7 @@
</dcat:theme>
<dcat:keyword xml:lang="fre">Mobilité</dcat:keyword>
<dcat:keyword xml:lang="fre">Observation de la terre et environnement</dcat:keyword>
<dcat:theme>
<skos:Concept rdf:about="http://data.europa.eu/eli/reg/2014/1143/oj">
<skos:prefLabel xml:lang="fre">1143/2014</skos:prefLabel>
</skos:Concept>
</dcat:theme>
<dcatap:applicableLegislation rdf:resource="http://data.europa.eu/eli/reg/2014/1143/oj"/>
<dct:accessRights>
<dct:RightsStatement rdf:about="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations"/>
</dct:accessRights>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,7 @@
</dcat:theme>
<dcat:keyword xml:lang="fre">Mobilité</dcat:keyword>
<dcat:keyword xml:lang="fre">Observation de la terre et environnement</dcat:keyword>
<dcat:theme>
<skos:Concept rdf:about="http://data.europa.eu/eli/reg/2014/1143/oj">
<skos:prefLabel xml:lang="fre">1143/2014</skos:prefLabel>
</skos:Concept>
</dcat:theme>
<dcatap:applicableLegislation rdf:resource="http://data.europa.eu/eli/reg/2014/1143/oj"/>
<dct:accessRights>
<dct:RightsStatement rdf:about="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations"/>
</dct:accessRights>
Expand Down

0 comments on commit 0fa0dd3

Please sign in to comment.