Skip to content

Commit

Permalink
Improve dct:title and dct:description for distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
seitenbau-govdata authored and jvanzadelhoff committed Jul 17, 2020
1 parent 6ff0fcc commit c1d14b5
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/main/resources/iso2dcat.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -735,14 +735,28 @@
<dcat:Distribution rdf:about="{gmd:linkage/*}#distribution">
<xsl:variable name="linkage" select="string(gmd:linkage/*)"/>
<xsl:choose>
<xsl:when test="gmd:name/*[text() != '']">
<xsl:when test="gmd:name/*[text() != ''] | gmd:description/*[text() != '']">
<dct:title>
<xsl:call-template name="xmlLang"/>
<xsl:value-of select="gmd:name/*"/>
<xsl:choose>
<xsl:when test="gmd:name/*[text() != '']">
<xsl:value-of select="gmd:name/*"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="gmd:description/*"/>
</xsl:otherwise>
</xsl:choose>
</dct:title>
<dct:description>
<xsl:call-template name="xmlLang"/>
<xsl:value-of select="gmd:name/*"/>
<xsl:choose>
<xsl:when test="gmd:description/*[text() != '']">
<xsl:value-of select="gmd:description/*"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="gmd:name/*"/>
</xsl:otherwise>
</xsl:choose>
</dct:description>
</xsl:when>
<xsl:when test="starts-with($linkage, 'http') and contains($linkage, '?')">
Expand Down

0 comments on commit c1d14b5

Please sign in to comment.