Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #571

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 3 additions & 4 deletions src/dl-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@
<xsl:when test="$s = 'methods'">
<xsl:value-of select="'Methods'"/>
</xsl:when>
<!-- Requires Vendor development work
<xsl:when test="$s = 'model'">
<xsl:when test="$s = 'model'">
<xsl:value-of select="'Model'"/>
</xsl:when>-->
</xsl:when>
<xsl:when test="$s = 'additional-information'">
<xsl:value-of select="'Additional information'"/>
</xsl:when>
Expand All @@ -211,7 +210,7 @@
<xsl:value-of select="'undefined'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
</xsl:function>

<xsl:function name="e:fig-id-type" as="xs:string">
<xsl:param name="s" as="xs:string"/>
Expand Down
4 changes: 3 additions & 1 deletion src/dl-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@
<xsl:when test="$s = 'methods'">
<xsl:value-of select="'Methods'"/>
</xsl:when>

<xsl:when test="$s = 'model'">
<xsl:value-of select="'Model'"/>
</xsl:when>
<xsl:when test="$s = 'additional-information'">
<xsl:value-of select="'Additional information'"/>
</xsl:when>
Expand Down
21 changes: 10 additions & 11 deletions src/final-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@
<xsl:when test="$s = 'methods'">
<xsl:value-of select="'Methods'"/>
</xsl:when>
<!-- Requires Vendor development work
<xsl:when test="$s = 'model'">
<xsl:when test="$s = 'model'">
<xsl:value-of select="'Model'"/>
</xsl:when>-->
</xsl:when>
<xsl:when test="$s = 'additional-information'">
<xsl:value-of select="'Additional information'"/>
</xsl:when>
Expand All @@ -211,7 +210,7 @@
<xsl:value-of select="'undefined'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
</xsl:function>

<xsl:function name="e:fig-id-type" as="xs:string">
<xsl:param name="s" as="xs:string"/>
Expand Down Expand Up @@ -4306,9 +4305,9 @@
<pattern id="ack-title-tests-pattern">
<rule context="ack" id="ack-title-tests">

<assert test="title = 'Acknowledgements'" role="error" id="ack-title-test">[ack-title-test] ack must have a title that contains 'Acknowledgements'. Currently it is '<value-of select="title"/>'.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hddcf-ack-title-test" test="title = 'Acknowledgements'" role="error" id="ack-title-test">[ack-title-test] ack must have a title that contains 'Acknowledgements'. Currently it is '<value-of select="title"/>'.</assert>

<assert test="p[* or not(normalize-space(.)='')]" role="error" id="ack-content-test">[ack-content-test] An Acknowledgements section must contain content. Either add in the missing content or delete the Acknowledgements.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hslfn-ack-content-test" test="p[* or not(normalize-space(.)='')]" role="error" id="ack-content-test">[ack-content-test] An Acknowledgements section must contain content. Either add in the missing content or delete the Acknowledgements.</assert>

</rule>
</pattern>
Expand All @@ -4317,7 +4316,7 @@
<let name="hit" value="string-join(for $x in tokenize(.,' ') return if (matches($x,'^[A-Z]{1}\.$')) then $x else (),', ')"/>
<let name="hit-count" value="count(for $x in tokenize(.,' ') return if (matches($x,'^[A-Z]{1}\.$')) then $x else ())"/>

<report test="matches(.,' [A-Z]\. |^[A-Z]\. ')" role="warning" id="ack-full-stop-intial-test">[ack-full-stop-intial-test] p element in Acknowledgements contains what looks like <value-of select="$hit-count"/> initial(s) followed by a full stop. Is it correct? - <value-of select="$hit"/>
<report see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#ht2dv-ack-full-stop-intial-test" test="matches(.,' [A-Z]\. |^[A-Z]\. ')" role="warning" id="ack-full-stop-intial-test">[ack-full-stop-intial-test] p element in Acknowledgements contains what looks like <value-of select="$hit-count"/> initial(s) followed by a full stop. Is it correct? - <value-of select="$hit"/>
</report>

</rule>
Expand Down Expand Up @@ -4706,7 +4705,7 @@

<report test="count(app-group) gt 1" role="error" id="back-test-6">[back-test-6] One and only one app-group may be present in back.</report>

<report test="if ($article-type = ($features-article-types,$notice-article-types)) then () else if ($subj-type = 'Scientific Correspondence') then () else (not(ack))" role="warning" id="back-test-8">[back-test-8] '<value-of select="$article-type"/>' usually have acknowledgement sections, but there isn't one here. Is this correct?</report>
<report see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hmlys-back-test-8" test="if ($article-type = ($features-article-types,$notice-article-types)) then () else if ($subj-type = 'Scientific Correspondence') then () else (not(ack))" role="warning" id="back-test-8">[back-test-8] '<value-of select="$article-type"/>' usually have acknowledgement sections, but there isn't one here. Is this correct?</report>

<report test="($article-type = $features-article-types) and (count(fn-group[@content-type='competing-interest']) != 1)" role="error" id="back-test-7">[back-test-7] An fn-group[@content-type='competing-interest'] must be present as a child of back <value-of select="$subj-type"/> content.</report>

Expand All @@ -4731,13 +4730,13 @@
<pattern id="ack-tests-pattern">
<rule context="back/ack" id="ack-tests">

<assert test="count(title) = 1" role="error" id="ack-test-1">[ack-test-1] ack must have only 1 title.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#howwo-ack-test-1" test="count(title) = 1" role="error" id="ack-test-1">[ack-test-1] ack must have only 1 title.</assert>
</rule>
</pattern>
<pattern id="ack-child-tests-pattern">
<rule context="back/ack/*" id="ack-child-tests">

<assert test="local-name() = ('p','sec','title')" role="error" id="ack-child-test-1">[ack-child-test-1] Only p, sec or title can be children of ack. <name/> is not allowed.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hdl9z-ack-child-test-1" test="local-name() = ('p','sec','title')" role="error" id="ack-child-test-1">[ack-child-test-1] Only p, sec or title can be children of ack. <name/> is not allowed.</assert>
</rule>
</pattern>
<pattern id="app-tests-pattern">
Expand Down Expand Up @@ -8179,7 +8178,7 @@
<report see="https://elifeproduction.slab.com/posts/article-structure-5nhfjxj0#sec-title-hiv" test="matches(upper-case($no-link-text),'^HIV | HIV | HIV') and not(matches($no-link-text,'^HIV | HIV | HIV'))" role="warning" id="sec-title-hiv">[sec-title-hiv] Section title contains the word HIV, but it is not in all caps - <value-of select="."/>
</report>

<report test="matches(.,'^[\p{Zs}\p{P}]*[Aa][ck][ck]n?ow[le][le]?[dg][dg]?e?ments?[\p{Zs}\p{P}]*$')" role="error" id="sec-title-ack">[sec-title-ack] Section title indicates that it is an acknowledgements section - <value-of select="."/>. Acknowledgements must be tagged as an &lt;ack&gt; element in the back of the article.</report>
<report see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#h9cd3-sec-title-ack" test="matches(.,'^[\p{Zs}\p{P}]*[Aa][ck][ck]n?ow[le][le]?[dg][dg]?e?ments?[\p{Zs}\p{P}]*$')" role="error" id="sec-title-ack">[sec-title-ack] Section title indicates that it is an acknowledgements section - <value-of select="."/>. Acknowledgements must be tagged as an &lt;ack&gt; element in the back of the article.</report>

</rule>
</pattern>
Expand Down
11 changes: 10 additions & 1 deletion src/final-JATS-schematron.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@
<xsl:when test="$s = 'methods'">
<xsl:value-of select="'Methods'"/>
</xsl:when>

<xsl:when test="$s = 'model'">
<xsl:value-of select="'Model'"/>
</xsl:when>
<xsl:when test="$s = 'additional-information'">
<xsl:value-of select="'Additional information'"/>
</xsl:when>
Expand Down Expand Up @@ -20367,6 +20369,7 @@
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="title = 'Acknowledgements'">
<xsl:attribute name="id">ack-title-test</xsl:attribute>
<xsl:attribute name="see">https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hddcf-ack-title-test</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
Expand All @@ -20384,6 +20387,7 @@
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="p[* or not(normalize-space(.)='')]">
<xsl:attribute name="id">ack-content-test</xsl:attribute>
<xsl:attribute name="see">https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hslfn-ack-content-test</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
Expand Down Expand Up @@ -20411,6 +20415,7 @@
<xsl:if test="matches(.,' [A-Z]\. |^[A-Z]\. ')">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="matches(.,' [A-Z]\. |^[A-Z]\. ')">
<xsl:attribute name="id">ack-full-stop-intial-test</xsl:attribute>
<xsl:attribute name="see">https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#ht2dv-ack-full-stop-intial-test</xsl:attribute>
<xsl:attribute name="role">warning</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
Expand Down Expand Up @@ -22217,6 +22222,7 @@
<xsl:if test="if ($article-type = ($features-article-types,$notice-article-types)) then () else if ($subj-type = 'Scientific Correspondence') then () else (not(ack))">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="if ($article-type = ($features-article-types,$notice-article-types)) then () else if ($subj-type = 'Scientific Correspondence') then () else (not(ack))">
<xsl:attribute name="id">back-test-8</xsl:attribute>
<xsl:attribute name="see">https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hmlys-back-test-8</xsl:attribute>
<xsl:attribute name="role">warning</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
Expand Down Expand Up @@ -22352,6 +22358,7 @@
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="count(title) = 1">
<xsl:attribute name="id">ack-test-1</xsl:attribute>
<xsl:attribute name="see">https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#howwo-ack-test-1</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
Expand Down Expand Up @@ -22379,6 +22386,7 @@
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="local-name() = ('p','sec','title')">
<xsl:attribute name="id">ack-child-test-1</xsl:attribute>
<xsl:attribute name="see">https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hdl9z-ack-child-test-1</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
Expand Down Expand Up @@ -41257,6 +41265,7 @@
<xsl:if test="matches(.,'^[\p{Zs}\p{P}]*[Aa][ck][ck]n?ow[le][le]?[dg][dg]?e?ments?[\p{Zs}\p{P}]*$')">
<svrl:successful-report xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="matches(.,'^[\p{Zs}\p{P}]*[Aa][ck][ck]n?ow[le][le]?[dg][dg]?e?ments?[\p{Zs}\p{P}]*$')">
<xsl:attribute name="id">sec-title-ack</xsl:attribute>
<xsl:attribute name="see">https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#h9cd3-sec-title-ack</xsl:attribute>
<xsl:attribute name="role">error</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
Expand Down
21 changes: 10 additions & 11 deletions src/final-package-JATS-schematron.sch
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@
<xsl:when test="$s = 'methods'">
<xsl:value-of select="'Methods'"/>
</xsl:when>
<!-- Requires Vendor development work
<xsl:when test="$s = 'model'">
<xsl:when test="$s = 'model'">
<xsl:value-of select="'Model'"/>
</xsl:when>-->
</xsl:when>
<xsl:when test="$s = 'additional-information'">
<xsl:value-of select="'Additional information'"/>
</xsl:when>
Expand All @@ -211,7 +210,7 @@
<xsl:value-of select="'undefined'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:function>
</xsl:function>

<xsl:function name="e:fig-id-type" as="xs:string">
<xsl:param name="s" as="xs:string"/>
Expand Down Expand Up @@ -4463,9 +4462,9 @@
<pattern id="ack-title-tests-pattern">
<rule context="ack" id="ack-title-tests">

<assert test="title = 'Acknowledgements'" role="error" id="ack-title-test">ack must have a title that contains 'Acknowledgements'. Currently it is '<value-of select="title"/>'.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hddcf-ack-title-test" test="title = 'Acknowledgements'" role="error" id="ack-title-test">ack must have a title that contains 'Acknowledgements'. Currently it is '<value-of select="title"/>'.</assert>

<assert test="p[* or not(normalize-space(.)='')]" role="error" id="ack-content-test">An Acknowledgements section must contain content. Either add in the missing content or delete the Acknowledgements.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hslfn-ack-content-test" test="p[* or not(normalize-space(.)='')]" role="error" id="ack-content-test">An Acknowledgements section must contain content. Either add in the missing content or delete the Acknowledgements.</assert>

</rule>
</pattern>
Expand All @@ -4474,7 +4473,7 @@
<let name="hit" value="string-join(for $x in tokenize(.,' ') return if (matches($x,'^[A-Z]{1}\.$')) then $x else (),', ')"/>
<let name="hit-count" value="count(for $x in tokenize(.,' ') return if (matches($x,'^[A-Z]{1}\.$')) then $x else ())"/>

<report test="matches(.,' [A-Z]\. |^[A-Z]\. ')" role="warning" id="ack-full-stop-intial-test">p element in Acknowledgements contains what looks like <value-of select="$hit-count"/> initial(s) followed by a full stop. Is it correct? - <value-of select="$hit"/>
<report see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#ht2dv-ack-full-stop-intial-test" test="matches(.,' [A-Z]\. |^[A-Z]\. ')" role="warning" id="ack-full-stop-intial-test">p element in Acknowledgements contains what looks like <value-of select="$hit-count"/> initial(s) followed by a full stop. Is it correct? - <value-of select="$hit"/>
</report>

</rule>
Expand Down Expand Up @@ -4869,7 +4868,7 @@

<report test="count(app-group) gt 1" role="error" id="back-test-6">One and only one app-group may be present in back.</report>

<report test="if ($article-type = ($features-article-types,$notice-article-types)) then () else if ($subj-type = 'Scientific Correspondence') then () else (not(ack))" role="warning" id="back-test-8">'<value-of select="$article-type"/>' usually have acknowledgement sections, but there isn't one here. Is this correct?</report>
<report see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hmlys-back-test-8" test="if ($article-type = ($features-article-types,$notice-article-types)) then () else if ($subj-type = 'Scientific Correspondence') then () else (not(ack))" role="warning" id="back-test-8">'<value-of select="$article-type"/>' usually have acknowledgement sections, but there isn't one here. Is this correct?</report>

<report test="($article-type = $features-article-types) and (count(fn-group[@content-type='competing-interest']) != 1)" role="error" id="back-test-7">An fn-group[@content-type='competing-interest'] must be present as a child of back <value-of select="$subj-type"/> content.</report>

Expand All @@ -4895,13 +4894,13 @@
<pattern id="ack-tests-pattern">
<rule context="back/ack" id="ack-tests">

<assert test="count(title) = 1" role="error" id="ack-test-1">ack must have only 1 title.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#howwo-ack-test-1" test="count(title) = 1" role="error" id="ack-test-1">ack must have only 1 title.</assert>
</rule>
</pattern>
<pattern id="ack-child-tests-pattern">
<rule context="back/ack/*" id="ack-child-tests">

<assert test="local-name() = ('p','sec','title')" role="error" id="ack-child-test-1">Only p, sec or title can be children of ack. <name/> is not allowed.</assert>
<assert see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#hdl9z-ack-child-test-1" test="local-name() = ('p','sec','title')" role="error" id="ack-child-test-1">Only p, sec or title can be children of ack. <name/> is not allowed.</assert>
</rule>
</pattern>
<pattern id="app-tests-pattern">
Expand Down Expand Up @@ -8612,7 +8611,7 @@
<report see="https://elifeproduction.slab.com/posts/article-structure-5nhfjxj0#sec-title-hiv" test="matches(upper-case($no-link-text),'^HIV | HIV | HIV') and not(matches($no-link-text,'^HIV | HIV | HIV'))" role="warning" id="sec-title-hiv">Section title contains the word HIV, but it is not in all caps - <value-of select="."/>
</report>

<report test="matches(.,'^[\p{Zs}\p{P}]*[Aa][ck][ck]n?ow[le][le]?[dg][dg]?e?ments?[\p{Zs}\p{P}]*$')" role="error" id="sec-title-ack">Section title indicates that it is an acknowledgements section - <value-of select="."/>. Acknowledgements must be tagged as an &lt;ack&gt; element in the back of the article.</report>
<report see="https://elifeproduction.slab.com/posts/acknowledgements-49wvb1xt#h9cd3-sec-title-ack" test="matches(.,'^[\p{Zs}\p{P}]*[Aa][ck][ck]n?ow[le][le]?[dg][dg]?e?ments?[\p{Zs}\p{P}]*$')" role="error" id="sec-title-ack">Section title indicates that it is an acknowledgements section - <value-of select="."/>. Acknowledgements must be tagged as an &lt;ack&gt; element in the back of the article.</report>

</rule>
</pattern>
Expand Down
Loading
Loading