Skip to content

Commit

Permalink
RP XSL - tweak rearrange back
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Feb 19, 2025
1 parent 3c4f606 commit 7d2bce2
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/preprint-changes.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1689,9 +1689,7 @@
<xsl:if test="sec[not(matches(lower-case(title[1]),'data') and matches(lower-case(title[1]),'ava[il][il]ability|access|sharing')) and not(@sec-type='supplementary-material') and (sec or descendant::fig or descendant::table-wrap or descendant::supplementary-material or descendant::disp-formula or descendant::inline-formula or descendant::statement or descendant::code or descendant::preformat or descendant::ref-list)]">
<xsl:for-each select="sec[not(matches(lower-case(title[1]),'data') and matches(lower-case(title[1]),'ava[il][il]ability|access|sharing')) and not(@sec-type='supplementary-material') and (sec or descendant::fig or descendant::table-wrap or descendant::supplementary-material or descendant::disp-formula or descendant::inline-formula or descendant::statement or descendant::code or descendant::preformat or descendant::ref-list)]">
<xsl:text>&#xa;</xsl:text>
<xsl:copy>
<xsl:apply-templates select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:copy>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:if>
<!-- Ensure data availability is a top level section -->
Expand All @@ -1705,9 +1703,7 @@
<xsl:if test="ack">
<xsl:for-each select="ack">
<xsl:text>&#xa;</xsl:text>
<xsl:copy>
<xsl:apply-templates select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:copy>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:if>
<!-- Move (presumed) simple sections into an additional information section -->
Expand All @@ -1729,16 +1725,12 @@
<title>Additional information</title>
<xsl:for-each select="sec[not(matches(lower-case(title[1]),'data') and matches(lower-case(title[1]),'ava[il][il]ability|access|sharing')) and (not(@sec-type='supplementary-material' or sec or descendant::fig or descendant::table-wrap or descendant::supplementary-material or descendant::disp-formula or descendant::inline-formula or descendant::statement or descendant::code or descendant::preformat or descendant::ref-list))]">
<xsl:text>&#xa;</xsl:text>
<xsl:copy>
<xsl:apply-templates select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:copy>
<xsl:apply-templates select="."/>
</xsl:for-each>
<!-- glossary must come after sec according to the DTD -->
<xsl:for-each select="glossary">
<xsl:text>&#xa;</xsl:text>
<xsl:copy>
<xsl:apply-templates select="*|@*|text()|comment()|processing-instruction()"/>
</xsl:copy>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:text>&#xa;</xsl:text>
</xsl:element>
Expand Down

0 comments on commit 7d2bce2

Please sign in to comment.