Skip to content

Commit

Permalink
Fix for 90862
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Oct 23, 2023
1 parent f84e9a3 commit 72a6471
Show file tree
Hide file tree
Showing 4 changed files with 871 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,13 @@ This xsl fixes a mistake from bioRxiv which assigns an affiliation to the on beh

This xsl is to ensure that the correct email is attributed to the correct author. bioRxiv capture author emails addresses in a `<corresp>` inside the author notes. They do this becuase they intend to show the content as a string, instead of displaying the emails under each author it relates to. We have asked them to change this capture (capturing the email under the respecitve author contrib, as done in this xsl).

### [/src/273730/equation-fix.xsl](/src/273730/equation-fix.xsl)

This xsl accounts for a bug in Encoda. In this preprint some text that precedes a display equations is pulled in as if it is a caption for that equation which it treats as a figure.

The xsl adds an empty `disp-quote` element between the paragraph and display equation in order for the two to be adequately separated in the JSON.


# Modify bioRxiv XML in preparation for Encoda

Prerequisites:
Expand Down
25 changes: 25 additions & 0 deletions src/273730/equation-fix.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
exclude-result-prefixes="xs"
version="3.0">

<xsl:output method="xml" encoding="UTF-8"/>

<xsl:template match="*|@*|text()">
<xsl:copy>
<xsl:apply-templates select="*|@*|text()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="article[//article-meta/article-version='1.2']//disp-formula[@id='eqn8']">
<disp-quote/>
<xsl:text>&#xA;</xsl:text>
<xsl:copy>
<xsl:apply-templates select="*|@*|text()"/>
</xsl:copy>
<disp-quote/>
</xsl:template>

</xsl:stylesheet>
Loading

0 comments on commit 72a6471

Please sign in to comment.