Skip to content

Commit

Permalink
adjusting the templates for metadata provenance and reference public…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
Shirazos7 committed Nov 14, 2024
1 parent fdd5091 commit 4f69198
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions xslt/software/xslt-software-Codemeta.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@
<xsl:template match="swhdeposit:metadata-provenance">
<swhdeposit:metadata-provenance>
<xsl:apply-templates select="schema:url"/>
<schema:url>https://api.zbmath.org/v1/</schema:url>
</swhdeposit:metadata-provenance>
</xsl:template>

<!-- Template for schema:url -->
<xsl:template match="schema:url">
<xsl:if test="normalize-space(.) != '' and . != 'None'">

<schema:url>
<xsl:value-of select="."/>
</schema:url>
</xsl:if>

</xsl:template>

<!-- Template for authors -->
Expand Down Expand Up @@ -229,24 +230,25 @@
</xsl:if>
</xsl:template>

<xsl:template match="standard_articles">

<xsl:template match="standard_articles">
<codemeta:referencePublication>
<!-- Conditional check for id -->
<xsl:if test="normalize-space(id) != '' and id != 'None'">
<codemeta:identifier>
<xsl:text>https://zbmath.org/</xsl:text>
<xsl:value-of select="id"/>
</codemeta:identifier>
</xsl:if>

<codemeta:referencePublication>
<xsl:if test="normalize-space(.) != '' and . != 'None'">
<codemeta:identifier>
<xsl:text>https://zbmath.org/</xsl:text>
<xsl:value-of select="id"/>
</codemeta:identifier>
</xsl:if>
<xsl:if test="normalize-space(.) != '' and . != 'None'">
<codemeta:datePublished>
<xsl:value-of select="year"/>
</codemeta:datePublished>
</xsl:if>
</codemeta:referencePublication>
<!-- Conditional check for year -->
<xsl:if test="normalize-space(year) != '' and year != 'None'">
<codemeta:datePublished>
<xsl:value-of select="year"/>
</codemeta:datePublished>
</xsl:if>
</codemeta:referencePublication>
</xsl:template>

</xsl:template>

<xsl:template match="zbmath_url">
<xsl:if test="normalize-space(.) != '' and . != 'None'">
Expand Down

0 comments on commit 4f69198

Please sign in to comment.