Skip to content

Commit

Permalink
RP - add warning for numerous ethics sec type
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-atherden committed Feb 13, 2025
1 parent 6ea7b21 commit 43978f0
Show file tree
Hide file tree
Showing 11 changed files with 228 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/rp-schematron-base.sch
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@
role="error"
id="sec-empty">sec element is not populated with any content. Either there's a mistake or the section should be removed.</assert>

<report test="@sec-type='data-availability' and preceding::sec[@sec-type='data-availability']"
<report test="@sec-type='data-availability' and (preceding::sec[@sec-type='data-availability'] or ancestor::sec[@sec-type='data-availability'])"
role="warning"
id="sec-data-availability">sec has the sec-type 'data-availability', but there is one or more other secs with this same sec-type. Are they duplicates?</report>

Expand All @@ -1230,6 +1230,10 @@
role="warning"
id="sec-coi-2">sec has a title suggesting it's a competing interest statement. COI statements should be captured within author-notes, so this content should be moved into fn with the fn-type="coi-statement" within author-notes.</report>

<report test="@sec-type='ethics-statement' and (preceding::sec[@sec-type='ethics-statement'] or ancestor::sec[@sec-type='ethics-statement'])"
role="error"
id="sec-ethics">sec has the sec-type 'ethics-statement', but there is one or more other secs with this same sec-type. Are they duplicates? There can only be one section with this sec-type (although it can have subsections with further distinctions that have separate 'ethics-...' sec-types - e.g. "ethics-approval-human", "ethics-approval-animal" etc.)</report>

<report test="def-list and not(*[not(name()=('label','title','sec-meta','def-list'))])"
role="error"
id="sec-def-list">sec element only contains a child def-list. This is therefore a glossary, not a sec.</report>
Expand Down
4 changes: 3 additions & 1 deletion src/rp-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,14 @@

<assert test="*[not(name()=('label','title','sec-meta'))]" role="error" id="sec-empty">[sec-empty] sec element is not populated with any content. Either there's a mistake or the section should be removed.</assert>

<report test="@sec-type='data-availability' and preceding::sec[@sec-type='data-availability']" role="warning" id="sec-data-availability">[sec-data-availability] sec has the sec-type 'data-availability', but there is one or more other secs with this same sec-type. Are they duplicates?</report>
<report test="@sec-type='data-availability' and (preceding::sec[@sec-type='data-availability'] or ancestor::sec[@sec-type='data-availability'])" role="warning" id="sec-data-availability">[sec-data-availability] sec has the sec-type 'data-availability', but there is one or more other secs with this same sec-type. Are they duplicates?</report>

<report test="title[1][matches(lower-case(.),'(compete?t?ing|conflicts?[\s-]of)[\s-]interest|disclosure|declaration|disclaimer')] and ancestor::article//article-meta/author-notes/fn[@fn-type='coi-statement']" role="warning" id="sec-coi">[sec-coi] sec has a title suggesting it's a competing interest statement, but there is also a competing interest statement in author-notes. Are they duplicates? COI statements should be captured within author-notes, so this section should likely be deleted.</report>

<report test="title[1][matches(lower-case(.),'(compete?t?ing|conflicts?[\s-]of)[\s-]interest|disclosure|declaration|disclaimer')] and not(ancestor::article//article-meta/author-notes/fn[@fn-type='coi-statement'])" role="warning" id="sec-coi-2">[sec-coi-2] sec has a title suggesting it's a competing interest statement. COI statements should be captured within author-notes, so this content should be moved into fn with the fn-type="coi-statement" within author-notes.</report>

<report test="@sec-type='ethics-statement' and (preceding::sec[@sec-type='ethics-statement'] or ancestor::sec[@sec-type='ethics-statement'])" role="error" id="sec-ethics">[sec-ethics] sec has the sec-type 'ethics-statement', but there is one or more other secs with this same sec-type. Are they duplicates? There can only be one section with this sec-type (although it can have subsections with further distinctions that have separate 'ethics-...' sec-types - e.g. "ethics-approval-human", "ethics-approval-animal" etc.)</report>

<report test="def-list and not(*[not(name()=('label','title','sec-meta','def-list'))])" role="error" id="sec-def-list">[sec-def-list] sec element only contains a child def-list. This is therefore a glossary, not a sec.</report>

<report test="glossary and not(*[not(name()=('label','title','sec-meta','glossary'))])" role="warning" id="sec-glossary">[sec-glossary] sec element only contains a child glossary. Is it a redundant sec (which should be deleted)? Or perhaps it indicates the structure/hierarchy has been incorrectly captured.</report>
Expand Down
15 changes: 13 additions & 2 deletions src/rp-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5066,8 +5066,8 @@
</xsl:otherwise>
</xsl:choose>
<!--REPORT warning-->
<xsl:if test="@sec-type='data-availability' and preceding::sec[@sec-type='data-availability']">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@sec-type='data-availability' and preceding::sec[@sec-type='data-availability']">
<xsl:if test="@sec-type='data-availability' and (preceding::sec[@sec-type='data-availability'] or ancestor::sec[@sec-type='data-availability'])">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@sec-type='data-availability' and (preceding::sec[@sec-type='data-availability'] or ancestor::sec[@sec-type='data-availability'])">
<xsl:attribute name="id">sec-data-availability</xsl:attribute>
<xsl:attribute name="role">warning</xsl:attribute>
<xsl:attribute name="location">
Expand Down Expand Up @@ -5099,6 +5099,17 @@
</svrl:successful-report>
</xsl:if>
<!--REPORT error-->
<xsl:if test="@sec-type='ethics-statement' and (preceding::sec[@sec-type='ethics-statement'] or ancestor::sec[@sec-type='ethics-statement'])">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="@sec-type='ethics-statement' and (preceding::sec[@sec-type='ethics-statement'] or ancestor::sec[@sec-type='ethics-statement'])">
<xsl:attribute name="id">sec-ethics</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>[sec-ethics] sec has the sec-type 'ethics-statement', but there is one or more other secs with this same sec-type. Are they duplicates? There can only be one section with this sec-type (although it can have subsections with further distinctions that have separate 'ethics-...' sec-types - e.g. "ethics-approval-human", "ethics-approval-animal" etc.)</svrl:text>
</svrl:successful-report>
</xsl:if>
<!--REPORT error-->
<xsl:if test="def-list and not(*[not(name()=('label','title','sec-meta','def-list'))])">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="def-list and not(*[not(name()=('label','title','sec-meta','def-list'))])">
<xsl:attribute name="id">sec-def-list</xsl:attribute>
Expand Down
2 changes: 1 addition & 1 deletion test/tests/rp/sec-checks/sec-data-availability/fail.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?oxygen SCHSchema="sec-data-availability.sch"?>
<!--Context: sec
Test: report @sec-type='data-availability' and preceding::sec[@sec-type='data-availability']
Test: report @sec-type='data-availability' and (preceding::sec[@sec-type='data-availability'] or ancestor::sec[@sec-type='data-availability'])
Message: sec has the sec-type 'data-availability', but there is one or more other secs with this same sec-type. Are they duplicates? -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
Expand Down
2 changes: 1 addition & 1 deletion test/tests/rp/sec-checks/sec-data-availability/pass.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?oxygen SCHSchema="sec-data-availability.sch"?>
<!--Context: sec
Test: report @sec-type='data-availability' and preceding::sec[@sec-type='data-availability']
Test: report @sec-type='data-availability' and (preceding::sec[@sec-type='data-availability'] or ancestor::sec[@sec-type='data-availability'])
Message: sec has the sec-type 'data-availability', but there is one or more other secs with this same sec-type. Are they duplicates? -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
</xsl:function>
<pattern id="sec-checks-pattern">
<rule context="sec" id="sec-checks">
<report test="@sec-type='data-availability' and preceding::sec[@sec-type='data-availability']" role="warning" id="sec-data-availability">[sec-data-availability] sec has the sec-type 'data-availability', but there is one or more other secs with this same sec-type. Are they duplicates?</report>
<report test="@sec-type='data-availability' and (preceding::sec[@sec-type='data-availability'] or ancestor::sec[@sec-type='data-availability'])" role="warning" id="sec-data-availability">[sec-data-availability] sec has the sec-type 'data-availability', but there is one or more other secs with this same sec-type. Are they duplicates?</report>
</rule>
</pattern>
<pattern id="root-pattern">
Expand Down
17 changes: 17 additions & 0 deletions test/tests/rp/sec-checks/sec-ethics/fail.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?oxygen SCHSchema="sec-ethics.sch"?>
<!--Context: sec
Test: report @sec-type='ethics-statement' and (preceding::sec[@sec-type='ethics-statement'] or ancestor::sec[@sec-type='ethics-statement'])
Message: sec has the sec-type 'ethics-statement', but there is one or more other secs with this same sec-type. Are they duplicates? There can only be one section with this sec-type (although it can have subsections with further distinctions that have separate 'ethics-...' sec-types - e.g. "ethics-approval-human", "ethics-approval-animal" etc.) -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
<sec id="s6" sec-type="ethics-statement">
<title>Ethics</title>
<sec sec-type="ethics-statement">
<p>Human subjects: Fresh tissue samples were obtained upon informed consent from patients undergoing surgery at the Gynecology Division of the European Institute of Oncology (Milan). Sample collection was performed under the protocol number R789-IEO approved by the Ethics Committee of the European Institute of Oncology.</p>
</sec>
<sec sec-type="ethics-statement">
<p>Animal experimentation: All animal studies were performed following a protocol approved by the fully authorized animal facility of European Institute of Oncology and by the Italian Ministry of Health (as required by the Italian Law) (IACUCs number 1256/2015) and in accordance to EU directive 2010/63. Mouse tissues were obtained from Karolinska Institutet (Stockholm, Sweden) and IRCCS San Raffaele Scientific Institute (Milan, Italy), in accordance with Institutional Animal Care and Use Committees.</p>
</sec>
</sec>
</article>
</root>
17 changes: 17 additions & 0 deletions test/tests/rp/sec-checks/sec-ethics/pass.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?oxygen SCHSchema="sec-ethics.sch"?>
<!--Context: sec
Test: report @sec-type='ethics-statement' and (preceding::sec[@sec-type='ethics-statement'] or ancestor::sec[@sec-type='ethics-statement'])
Message: sec has the sec-type 'ethics-statement', but there is one or more other secs with this same sec-type. Are they duplicates? There can only be one section with this sec-type (although it can have subsections with further distinctions that have separate 'ethics-...' sec-types - e.g. "ethics-approval-human", "ethics-approval-animal" etc.) -->
<root xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<article>
<sec id="s6" sec-type="ethics-statement">
<title>Ethics</title>
<sec sec-type="ethics-approval-human">
<p>Human subjects: Fresh tissue samples were obtained upon informed consent from patients undergoing surgery at the Gynecology Division of the European Institute of Oncology (Milan). Sample collection was performed under the protocol number R789-IEO approved by the Ethics Committee of the European Institute of Oncology.</p>
</sec>
<sec sec-type="ethics-approval-animal">
<p>Animal experimentation: All animal studies were performed following a protocol approved by the fully authorized animal facility of European Institute of Oncology and by the Italian Ministry of Health (as required by the Italian Law) (IACUCs number 1256/2015) and in accordance to EU directive 2010/63. Mouse tissues were obtained from Karolinska Institutet (Stockholm, Sweden) and IRCCS San Raffaele Scientific Institute (Milan, Italy), in accordance with Institutional Animal Care and Use Committees.</p>
</sec>
</sec>
</article>
</root>
Loading

0 comments on commit 43978f0

Please sign in to comment.