Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,6 @@ using the region API -->
<entry key="http://publications.europa.eu/resource/authority/access-right/PUBLIC" match="start">Niet Commercieel, Geen Afgeleide Werken, Naamsvermelding verplicht,</entry>
<entry key="http://publications.europa.eu/resource/authority/access-right/PUBLIC">http://creativecommons.org/licenses/by-nc-nd/3.0/deed.nl</entry>
<entry key="http://publications.europa.eu/resource/authority/access-right/PUBLIC">http://creativecommons.org/licenses/by-nc-nd/4.0/deed.nl</entry>

<!-- TODO: review other allowed values related to this license -->
<entry key="http://publications.europa.eu/resource/authority/access-right/PUBLIC">Geo Gedeeld licentie</entry>
</xsl:variable>

<xsl:variable name="isMappingResourceConstraintsToEuVocabulary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,40 @@
<xsl:for-each select="$resourceConstraints/*/gmd:otherConstraints">

<xsl:variable name="httpUriInAnchorOrText"
select="(gmx:Anchor/@xlink:href[starts-with(., 'http')]
|gco:CharacterString[starts-with(., 'http')])[1]"/>
select="(gmx:Anchor/@xlink:href[starts-with(., 'http')]|gco:CharacterString[starts-with(., 'http')])[1]"/>

<xsl:choose>
<xsl:when test="$httpUriInAnchorOrText != ''">
<xsl:variable name="licenseUriWithoutHttp"
select="replace($httpUriInAnchorOrText,'https?://','')"/>

<xsl:if test="$httpUriInAnchorOrText != ''">
<xsl:variable name="licenseUriWithoutHttp"
select="replace($httpUriInAnchorOrText,'https?://','')"/>

<xsl:variable name="euDcatLicense"
select="$euLicenses/rdf:RDF/skos:Concept[
<xsl:variable name="euDcatLicense"
select="$euLicenses/rdf:RDF/skos:Concept[
matches(skos:exactMatch/@rdf:resource,
concat('https?://', $licenseUriWithoutHttp, '/?'))
or matches(@rdf:about,
concat('https?://', $licenseUriWithoutHttp, '/?'))]"/>

<xsl:if test="count($euDcatLicense) = 1">
<xsl:if test="string($euDcatLicense/skos:prefLabel[@xml:lang = 'nl'])"><xsl:value-of select="$euDcatLicense/skos:prefLabel[@xml:lang = 'nl']" /></xsl:if>
</xsl:if>
</xsl:if>
<xsl:if test="count($euDcatLicense) = 1">
<xsl:if test="string($euDcatLicense/skos:prefLabel[@xml:lang = 'nl'])"><xsl:value-of select="$euDcatLicense/skos:prefLabel[@xml:lang = 'nl']" /></xsl:if>
</xsl:if>
</xsl:when>

<xsl:otherwise>
<xsl:variable name="isGeoGedeeldLicense"
select="(gco:CharacterString|gmx:Anchor)[normalize-space(lower-case(.)) = 'geo gedeeld licentie']"/>

<xsl:if test="$isGeoGedeeldLicense">
<xsl:variable name="euDcatLicense"
select="$euLicenses/rdf:RDF/skos:Concept[@rdf:about = 'http://definities.geostandaarden.nl/DCAT-AP-NL/id/waarde/licentieValue/niet-open']"/>

<xsl:if test="string($euDcatLicense/skos:prefLabel[@xml:lang = 'nl'])">
<xsl:value-of select="$euDcatLicense/skos:prefLabel[@xml:lang = 'nl']"/>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>


</xsl:for-each>

Expand Down