Skip to content

Commit

Permalink
Change free-text license/accessRights mapping to rights
Browse files Browse the repository at this point in the history
SEMICeu/GeoDCAT-AP#113

Signed-off-by: Jakub Klímek <jakub@jakubklimek.com>
  • Loading branch information
jakubklimek committed Jun 19, 2024
1 parent 5d284ee commit 0dc70de
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions iso-19139-to-dcat-ap.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2746,14 +2746,14 @@
<xsl:choose>
<!-- In case the rights/licence URL IS NOT provided -->
<xsl:when test="normalize-space(gco:CharacterString) != ''">
<dct:license>
<dct:LicenseDocument>
<dct:rights>
<dct:RightsStatement>
<dct:description xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></dct:description>
<xsl:call-template name="LocalisedString">
<xsl:with-param name="term">dct:description</xsl:with-param>
</xsl:call-template>
</dct:LicenseDocument>
</dct:license>
</dct:RightsStatement>
</dct:rights>
<!--
<dct:rights>
<dct:RightsStatement>
Expand All @@ -2774,17 +2774,17 @@
</xsl:when>
</xsl:choose>
</xsl:variable>
<dct:license>
<dct:LicenseDocument>
<dct:rights>
<dct:RightsStatement>
<xsl:if test="$use-limitation-code != ''">
<dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$use-limitation-code"/></dct:identifier>
</xsl:if>
<dct:description xml:lang="{$MetadataLanguage}"><xsl:value-of select="$use-limitation-text"/></dct:description>
<xsl:call-template name="LocalisedString">
<xsl:with-param name="term">dct:description</xsl:with-param>
</xsl:call-template>
</dct:LicenseDocument>
</dct:license>
</dct:RightsStatement>
</dct:rights>
<!--
<dct:rights>
<dct:RightsStatement>
Expand Down Expand Up @@ -2816,14 +2816,14 @@
<xsl:choose>
<!-- In case the rights/licence URL IS NOT provided -->
<xsl:when test="normalize-space(gco:CharacterString) != ''">
<dct:license>
<dct:LicenseDocument>
<dct:rights>
<dct:RightsStatement>
<dct:description xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></dct:description>
<xsl:call-template name="LocalisedString">
<xsl:with-param name="term">dct:description</xsl:with-param>
</xsl:call-template>
</dct:LicenseDocument>
</dct:license>
</dct:RightsStatement>
</dct:rights>
</xsl:when>
<xsl:when test="gmd:MD_RestrictionCode">
<xsl:variable name="use-constraints-code" select="normalize-space(@codeListValue)"/>
Expand All @@ -2837,17 +2837,17 @@
</xsl:when>
</xsl:choose>
</xsl:variable>
<dct:license>
<dct:LicenseDocument>
<dct:rights>
<dct:RightsStatement>
<xsl:if test="$use-constraints-code != ''">
<dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$use-constraints-code"/></dct:identifier>
</xsl:if>
<dct:description xml:lang="{$MetadataLanguage}"><xsl:value-of select="$use-constraints-text"/></dct:description>
<xsl:call-template name="LocalisedString">
<xsl:with-param name="term">dct:description</xsl:with-param>
</xsl:call-template>
</dct:LicenseDocument>
</dct:license>
</dct:RightsStatement>
</dct:rights>
</xsl:when>
<!-- In case the rights/licence URL IS provided -->
<xsl:when test="gmx:Anchor/@xlink:href">
Expand All @@ -2867,14 +2867,14 @@
<xsl:choose>
<!-- In case the rights/licence URL IS NOT provided -->
<xsl:when test="normalize-space(gco:CharacterString) != ''">
<dct:accessRights>
<dct:rights>
<dct:RightsStatement>
<dct:description xml:lang="{$MetadataLanguage}"><xsl:value-of select="normalize-space(gco:CharacterString)"/></dct:description>
<xsl:call-template name="LocalisedString">
<xsl:with-param name="term">dct:description</xsl:with-param>
</xsl:call-template>
</dct:RightsStatement>
</dct:accessRights>
</dct:rights>
</xsl:when>
<xsl:when test="gmd:MD_RestrictionCode">
<xsl:variable name="access-constraints-code" select="normalize-space(@codeListValue)"/>
Expand All @@ -2888,7 +2888,7 @@
</xsl:when>
</xsl:choose>
</xsl:variable>
<dct:accessRights>
<dct:rights>
<dct:RightsStatement>
<xsl:if test="$access-constraints-code != ''">
<dct:identifier rdf:datatype="{$xsd}string"><xsl:value-of select="$access-constraints-code"/></dct:identifier>
Expand All @@ -2898,7 +2898,7 @@
<xsl:with-param name="term">dct:description</xsl:with-param>
</xsl:call-template>
</dct:RightsStatement>
</dct:accessRights>
</dct:rights>
</xsl:when>
<!-- In case the rights/licence URL IS provided -->
<xsl:when test="gmx:Anchor/@xlink:href">
Expand Down

0 comments on commit 0dc70de

Please sign in to comment.