Skip to content
Merged
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
19 changes: 16 additions & 3 deletions xslt/software/xslt-software-OpenAire.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,16 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
<dc:language>eng</dc:language>
<xsl:apply-templates select="root/standard_articles/source"/>
<xsl:apply-templates select="root/standard_articles/title"/>
<xsl:apply-templates select="root/standard_articles/year"/>
<datacite:date dateType="Issued">
<xsl:choose>
<xsl:when test="root/standard_articles/year[normalize-space(.) != '' and . != 'None']">
<xsl:apply-templates select="root/standard_articles/year"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="root/references_year_alt[1]"/>
</xsl:otherwise>
</xsl:choose>
</datacite:date>

</resource>

Expand Down Expand Up @@ -166,11 +175,15 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or

<xsl:template match="year">
<xsl:if test="normalize-space(.) != '' and . != 'None'">
<datacite:date dateType="Issued">
<xsl:value-of select="."/>
</datacite:date>
</xsl:if>
</xsl:template>

<xsl:template match="root/references_year_alt">
<xsl:if test="position() = 1">
<xsl:value-of select="//references_year_alt[not(. > //references_year_alt)]" />
</xsl:if>
</xsl:template>


</xsl:stylesheet>
22 changes: 17 additions & 5 deletions xslt/software/xslt-software-datacite.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@
<xsl:apply-templates select="root/operating_systems"/>
<xsl:apply-templates select="root/programming_languages"/>
</descriptions>
<xsl:apply-templates select="root/standard_articles/year"/>

<publicationYear>
<xsl:choose>
<xsl:when test="root/standard_articles/year[normalize-space(.) != '' and . != 'None']">
<xsl:apply-templates select="root/standard_articles/year"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="root/references_year_alt[1]"/>
</xsl:otherwise>
</xsl:choose>
</publicationYear>
<subjects>
<xsl:apply-templates select="root/classification"/>
<xsl:apply-templates select="root/keywords"/>
Expand Down Expand Up @@ -100,11 +110,13 @@
</description>
</xsl:if>
</xsl:template>
<xsl:template match="year">
<!-- Transformation of publicationYear -->
<publicationYear>
<xsl:template match="year">
<xsl:value-of select="."/>
</publicationYear>
</xsl:template>
<xsl:template match="root/references_year_alt">
<xsl:if test="position() = 1">
<xsl:value-of select="//references_year_alt[not(. > //references_year_alt)]" />
</xsl:if>
</xsl:template>

<xsl:template match="classification">
Expand Down
Loading