Skip to content

Commit

Permalink
Merge pull request #146 from MaRDI4NFDI/Open-Aire-software-fix
Browse files Browse the repository at this point in the history
Open aire software fix
  • Loading branch information
Mazztok45 authored Dec 23, 2024
2 parents 8520a57 + c4af359 commit 6aa942b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions test/data/software/OpenAire-software-reference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,5 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
<dc:language>eng</dc:language>
<dc:source>zbMATH Open Web Interface contents unavailable due to conflicting licenses.</dc:source>
<oaire:citationTitle>zbMATH Open Web Interface contents unavailable due to conflicting licenses.</oaire:citationTitle>
<datacite:date dateType="Issued">2003</datacite:date>
</resource>
23 changes: 18 additions & 5 deletions xslt/software/xslt-software-OpenAire.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
</datacite:titles>
<xsl:apply-templates select="root/description"/>

<datacite:subjects>
<xsl:apply-templates select="root/classification"/>
<xsl:apply-templates select="root/keywords"/>
</datacite:subjects>
<xsl:if test="root/classification[normalize-space(.) != '' and . != 'None'] or root/keywords[normalize-space(.) != '' and . != 'None']">
<datacite:subjects>
<xsl:apply-templates select="root/classification"/>
<xsl:apply-templates select="root/keywords"/>
</datacite:subjects>
</xsl:if>

<datacite:relatedIdentifiers>
<xsl:apply-templates select="root/standard_articles/id"/>
Expand Down Expand Up @@ -58,6 +60,7 @@ 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"/>

</resource>

Expand Down Expand Up @@ -110,7 +113,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
<xsl:if test="normalize-space(.) != '' and . != 'None'">
<datacite:subject subjectScheme="msc2020" >
<xsl:value-of select="."/>
</datacite:subject>
</datacite:subject>
</xsl:if>
</xsl:template>

Expand All @@ -126,9 +129,11 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or


<xsl:template match="source">
<xsl:if test="normalize-space(.) != '' and . != 'None'">
<dc:source>
<xsl:value-of select="."/>
</dc:source>
</xsl:if>
</xsl:template>

<xsl:template match="title">
Expand All @@ -155,5 +160,13 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:if>
</xsl:template>

<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:stylesheet>

0 comments on commit 6aa942b

Please sign in to comment.