Skip to content

Commit

Permalink
#541 Convert full ISO dates to year, do not use fixed placeTerm (Jena)
Browse files Browse the repository at this point in the history
  • Loading branch information
Possommi committed May 7, 2024
1 parent 63664c9 commit ee1b454
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions common/src/main/resources/xsl/import/dbt2mods.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,19 @@

<xsl:template match="mods:originInfo[@eventType='publication']">
<mods:originInfo>
<mods:place>
<mods:placeTerm type="text">Jena</mods:placeTerm>
</mods:place>
<xsl:copy-of select="mods:dateIssued"/>
<xsl:copy-of select="mods:place"/>
<xsl:choose>
<!-- check for year -->
<xsl:when test="string-length(mods:dateIssued/text()) = 4">
<xsl:copy-of select="mods:dateIssued"/>
</xsl:when>
<!-- UBO supports only year of publication, full ISO dates must be converted -->
<xsl:when test="string-length(mods:dateIssued/text()) &gt; 4 ">
<mods:dateIssued encoding="{mods:dateIssued/@encoding}">
<xsl:value-of select="substring-before(mods:dateIssued/text(), '-')"/>
</mods:dateIssued>
</xsl:when>
</xsl:choose>
</mods:originInfo>
</xsl:template>

Expand Down

0 comments on commit ee1b454

Please # to comment.