Skip to content

Commit

Permalink
Merge pull request #169 from PeerJ/168-extend-optional-issn-support
Browse files Browse the repository at this point in the history
extend optional issn
  • Loading branch information
Michael Stoner authored Oct 22, 2019
2 parents de367eb + 4eb01de commit a72fe05
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
15 changes: 11 additions & 4 deletions src/data/xsl/jats-to-bibtex.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,17 @@
</template>

<template match="issn">
<call-template name="item">
<with-param name="key">issn</with-param>
<with-param name="value" select="."/>
</call-template>
<choose>
<when test=".='0000-0000'">
<!-- miss out the placeholder ISSN - 0000-0000 -->
</when>
<otherwise>
<call-template name="item">
<with-param name="key">issn</with-param>
<with-param name="value" select="."/>
</call-template>
</otherwise>
</choose>
</template>

<!-- formatting markup -->
Expand Down
19 changes: 16 additions & 3 deletions src/data/xsl/jats-to-doaj.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
<xsl:value-of select="../journal-meta/journal-title-group/journal-title" />
</journalTitle>

<eissn>
<xsl:value-of select="../journal-meta/issn"/>
</eissn>
<xsl:apply-templates select="../journal-meta/issn"/>

<publicationDate>
<xsl:value-of select="$pub-date/@iso-8601-date"/>
Expand Down Expand Up @@ -157,4 +155,19 @@
<xsl:text>&#10;&#10;</xsl:text>
</xsl:if>
</xsl:template>

<!-- ISSN -->
<xsl:template match="issn">
<xsl:choose>
<xsl:when test=".='0000-0000'">
<!-- obmit out the placeholder ISSN - 0000-0000 -->
</xsl:when>
<xsl:otherwise>
<eissn>
<with-param name="value" select="." />
</eissn>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>
14 changes: 11 additions & 3 deletions src/data/xsl/jats-to-ris.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,18 @@
<with-param name="key">J2</with-param>
</call-template>
</template>
<!-- issn -->

<template match="issn">
<call-template name="item">
<with-param name="key">SN</with-param>
</call-template>
<choose>
<when test=".='0000-0000'">
<!-- obmit the placeholder ISSN of 0000-0000 -->
</when>
<otherwise>
<call-template name="item">
<with-param name="key">SN</with-param>
</call-template>
</otherwise>
</choose>
</template>
</stylesheet>

0 comments on commit a72fe05

Please sign in to comment.