Skip to content

Commit

Permalink
support for dct:temporal
Browse files Browse the repository at this point in the history
  • Loading branch information
jze authored and jvanzadelhoff committed Nov 4, 2022
1 parent de9928f commit 63cb0bc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/resources/iso2dcat.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@
<!--dct:spatial-->
<xsl:apply-templates select="gmd:identificationInfo[1]/*/gmd:extent/*/gmd:geographicElement|gmd:identificationInfo/*/srv:extent/*/gmd:geographicElement"/>

<!--dct:temporal-->
<xsl:apply-templates select="gmd:identificationInfo[1]/*/gmd:extent/*/gmd:temporalElement|gmd:identificationInfo/*/srv:extent/*/gmd:temporalElement"/>

<!--dct:issued dct:modified-->
<xsl:apply-templates select="gmd:dateStamp"/>
<xsl:apply-templates select="gmd:identificationInfo[1]/*/gmd:citation/*/gmd:date/*[gmd:dateType/*/@codeListValue='publication' or gmd:dateType/*/@codeListValue='revision' or gmd:dateType/*/@codeListValue='creation']/gmd:date/*"/>
Expand Down Expand Up @@ -362,6 +365,24 @@
</xsl:if>
</xsl:template>

<xsl:template match="gmd:identificationInfo/*/gmd:extent/*/gmd:temporalElement|gmd:identificationInfo/*/srv:extent/*/gmd:temporalElement">
<dct:temporal>
<dct:PeriodOfTime>
<xsl:if test="./gmd:EX_TemporalExtent/gmd:extent/*:TimePeriod/*:beginPosition">
<schema:startDate rdf:datatype="http:https://www.w3.org/2001/XMLSchema#dateTime">
<xsl:value-of select="./gmd:EX_TemporalExtent/gmd:extent/*:TimePeriod/*:beginPosition"/>
</schema:startDate>
</xsl:if>
<xsl:if test="./gmd:EX_TemporalExtent/gmd:extent/*:TimePeriod/*:endPosition">
<schema:endDate rdf:datatype="http:https://www.w3.org/2001/XMLSchema#dateTime">
<xsl:value-of select="./gmd:EX_TemporalExtent/gmd:extent/*:TimePeriod/*:endPosition"/>
</schema:endDate>
</xsl:if>
</dct:PeriodOfTime>
</dct:temporal>
</xsl:template>


<xsl:template match="gmd:extent/*/gmd:description/gco:CharacterString">
<rdfs:label>
<xsl:call-template name="xmlLang"/>
Expand Down

0 comments on commit 63cb0bc

Please sign in to comment.