Skip to content

Commit

Permalink
Merge pull request #147 from MaRDI4NFDI/Open-Aire-software-fix
Browse files Browse the repository at this point in the history
Open aire software fix of xslt
  • Loading branch information
Mazztok45 authored Dec 27, 2024
2 parents 6aa942b + 85a981f commit 6641642
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xslt/software/xslt-software-OpenAire.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
</datacite:subjects>
</xsl:if>

<xsl:if test="root/standard_articles/id[normalize-space(.) != '' and . != 'None'] or root/references[normalize-space(.) != '' and . != 'None']">
<datacite:relatedIdentifiers>
<xsl:apply-templates select="root/standard_articles/id"/>
<xsl:apply-templates select="root/references"/>
</datacite:relatedIdentifiers>
</xsl:if>

<datacite:alternateIdentifier alternateIdentifierType="URL">
<xsl:apply-templates select="root/homepage"/>
Expand Down Expand Up @@ -137,13 +139,15 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:template>

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

<xsl:template match="standard_articles/id">
<xsl:if test="normalize-space(.)">
<xsl:if test="normalize-space(.) != '' and . != 'None'">
<!-- If the id element is present and not empty -->
<datacite:relatedIdentifier relatedIdentifierType="URL" relationType="IsReferencedBy">
<xsl:value-of select="concat('https://zbmath.org/', normalize-space(.))"/>
Expand All @@ -152,7 +156,7 @@ Content generated by zbMATH Open, such as reviews, classifications, software, or
</xsl:template>

<xsl:template match="references">
<xsl:if test="normalize-space(.)">
<xsl:if test="normalize-space(.) != '' and . != 'None'">
<!-- If the id element is present and not empty -->
<datacite:relatedIdentifier relatedIdentifierType="URL" relationType="IsCitedBy">
<xsl:value-of select="concat('https://api.zbmath.org/v1/document/', normalize-space(.))"/>
Expand Down

0 comments on commit 6641642

Please sign in to comment.