Skip to content

Commit

Permalink
adding if else contribution for adding code repository as suggested in
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazztok45 committed Feb 13, 2024
1 parent 78b1496 commit 2ed83e6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions xslt/software/xslt-software-transformation.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:datacite="http://datacite.org/schema/kernel-4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:zbmath="https://zbmath.org/zbmath/elements/1.0/">
<xsl:template match="/">
<resource>

<identifier>
<xsl:value-of select="root/result/id"/>
</identifier>
Expand All @@ -16,9 +17,20 @@
<xsl:value-of select="root/result/description"/>
</description>

<publisher>
<xsl:value-of select="root/result/homepage"/>
</publisher>
<xsl:choose>
<xsl:when test= "root/result/source_code != ''">
<!-- will be instantiated for item #1 and item #2 -->
<publisher>
<xsl:value-of select="root/result/source_code"/>
</publisher>
</xsl:when>
<xsl:otherwise>
<contributor contributorType="HostingInstitution">
<xsl:value-of select="root/result/homepage" />
</contributor>
</xsl:otherwise>
</xsl:choose>



<xsl:for-each select="root/result/classification">
Expand All @@ -28,6 +40,7 @@
<xsl:for-each select="root/result/related_software/id">
<relatedIdentifier><xsl:value-of select="."/></relatedIdentifier>
</xsl:for-each>

</resource>
</xsl:template>
</xsl:stylesheet>

0 comments on commit 2ed83e6

Please sign in to comment.