Describe the bug
When transforming an element-citation our XSL will attempt to add the year of the reference after person-group. It will do so even if there is no year present in the citation. Although JATS recommends adding year as best practice it is not enforced. See: https://jats.nlm.nih.gov/archiving/tag-library/1.2/element/element-citation.html
Janeway version
The version of Janeway under which the bug has been reproduced.
If running off of master, please, indicate the current HEAD of the Janeway installation
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
If year is not present, no brackets should be displayed.
|
<xsl:when test="self::person-group/@person-group-type='author'"> |
|
<xsl:apply-templates select="node()" mode="none"/> |
|
<xsl:if test="not(preceding-sibling::person-group)"> |
|
<xsl:text> (</xsl:text> |
|
<xsl:value-of select="..//year"/> |
|
<xsl:text>).</xsl:text> |
|
</xsl:if> |
|
</xsl:when> |
|
<xsl:when test="self::person-group/@person-group-type='editor'"> |
|
<xsl:apply-templates select="node()" mode="none"/> |
|
<xsl:if test="not(preceding-sibling::person-group)"> |
|
<xsl:text>. (</xsl:text> |
|
<xsl:value-of select="..//year"/> |
|
<xsl:text>).</xsl:text> |
|
</xsl:if> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:apply-templates select="node()" mode="none"/> |
|
</xsl:otherwise> |
|
</xsl:choose> |
Describe the bug
When transforming an element-citation our XSL will attempt to add the year of the reference after person-group. It will do so even if there is no year present in the citation. Although JATS recommends adding year as best practice it is not enforced. See: https://jats.nlm.nih.gov/archiving/tag-library/1.2/element/element-citation.html
Janeway version
The version of Janeway under which the bug has been reproduced.
If running off of master, please, indicate the current HEAD of the Janeway installation
To Reproduce
Steps to reproduce the behavior:
Expected behavior
If year is not present, no brackets should be displayed.
janeway/src/transform/xsl/default.xsl
Lines 2930 to 2949 in 4b53568