Skip to content

Commit

Permalink
Updated license mapping to map to EU licenses for dcat-ap profile (re…
Browse files Browse the repository at this point in the history
…moved xsl messages)
  • Loading branch information
GeryNi committed May 8, 2024
1 parent b8a68d1 commit 24a9415
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,11 @@
<dct:license>
<dct:LicenseDocument>
<xsl:choose>
<!-- TODO: map license To EU Vocabulary isMappingResourceConstraintsToEuVocabulary -->
<xsl:when test="gcx:Anchor/@xlink:href">
<xsl:if test="$isMappingResourceConstraintsToEuVocabulary = true()">
<xsl:variable name="licenseUri" select="replace(gcx:Anchor/@xlink:href,'https?://','')"/>
<xsl:message><xsl:value-of select="$licenseUri"></xsl:value-of></xsl:message>
<xsl:variable name="dcatLicense"
select="$euLicenses/rdf:RDF/skos:Concept[matches(skos:exactMatch/@rdf:resource,concat('https?://',$licenseUri,'/?'))]"/>
<xsl:message><xsl:copy-of select="$dcatLicense"></xsl:copy-of></xsl:message>
<xsl:if test="$dcatLicense != ''"><!-- If license found in vocabulary -->
<skos:Concept rdf:about="{$dcatLicense/@rdf:about}">
<xsl:copy-of select="$dcatLicense/skos:prefLabel[@xml:lang = $languages/@iso2code] | $dcatLicense/skos:exactMatch"
Expand All @@ -113,7 +110,6 @@

<!-- KEEP License as is-->
<xsl:if test="$isMappingResourceConstraintsToEuVocabulary = false()">
<xsl:message>Keep original license</xsl:message>
<xsl:attribute name="rdf:about" select="gcx:Anchor/@xlink:href"/>
</xsl:if>
</xsl:when>
Expand Down

0 comments on commit 24a9415

Please sign in to comment.