From 0a1e5a7b1bd4024a303897a1edcf9b2d58ceda16 Mon Sep 17 00:00:00 2001 From: Fred Atherden <43879983+fred-atherden@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:10:01 +0000 Subject: [PATCH] RP - add checks for sub-article DOIs in RPs --- src/rp-schematron-base.sch | 17 ++ src/rp-schematron.sch | 7 + src/rp-schematron.xsl | 230 ++++++++++++------ .../sub-article-doi-check-1/fail.xml | 16 ++ .../sub-article-doi-check-1/pass.xml | 16 ++ .../sub-article-doi-check-1.sch | 158 ++++++++++++ .../sub-article-doi-check-2/fail.xml | 16 ++ .../sub-article-doi-check-2/pass.xml | 16 ++ .../sub-article-doi-check-2.sch | 158 ++++++++++++ .../sub-article-front-stub-check-1/fail.xml | 14 ++ .../sub-article-front-stub-check-1/pass.xml | 16 ++ .../sub-article-front-stub-check-1.sch | 157 ++++++++++++ test/xspec/rp-schematron.sch | 15 ++ test/xspec/rp-schematron.xspec | 34 +++ 14 files changed, 798 insertions(+), 72 deletions(-) create mode 100644 test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/fail.xml create mode 100644 test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/pass.xml create mode 100644 test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/sub-article-doi-check-1.sch create mode 100644 test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/fail.xml create mode 100644 test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/pass.xml create mode 100644 test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/sub-article-doi-check-2.sch create mode 100644 test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/fail.xml create mode 100644 test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/pass.xml create mode 100644 test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/sub-article-front-stub-check-1.sch diff --git a/src/rp-schematron-base.sch b/src/rp-schematron-base.sch index 0107a153a6..3af866bc21 100644 --- a/src/rp-schematron-base.sch +++ b/src/rp-schematron-base.sch @@ -2005,6 +2005,23 @@ role="error" id="sub-article-title-check-3">The title of a type sub-article should be 'Author response'. This one is: + + + Sub-article must have one (and only one) <article-id pub-id-type="doi"> element. This one does not. + + + + + The DOI for this sub-article does not match the permitted format: . + + The DOI for this sub-article () does not start with the version DOI for the Reviewed Preprint (). + diff --git a/src/rp-schematron.sch b/src/rp-schematron.sch index 9e4c652754..38a9f2a4fa 100644 --- a/src/rp-schematron.sch +++ b/src/rp-schematron.sch @@ -1059,6 +1059,13 @@ [sub-article-title-check-2] The title of a type sub-article should be in one of the following formats: 'Reviewer #0 (public review)' or 'Joint public review'. This one is: [sub-article-title-check-3] The title of a type sub-article should be 'Author response'. This one is: + + [sub-article-front-stub-check-1] Sub-article must have one (and only one) <article-id pub-id-type="doi"> element. This one does not. + + + [sub-article-doi-check-1] The DOI for this sub-article does not match the permitted format: . + + [sub-article-doi-check-2] The DOI for this sub-article () does not start with the version DOI for the Reviewed Preprint (). diff --git a/src/rp-schematron.xsl b/src/rp-schematron.xsl index 0aec6b2e50..97e1e6b2f9 100644 --- a/src/rp-schematron.xsl +++ b/src/rp-schematron.xsl @@ -1256,6 +1256,24 @@ + + + + + sub-article-front-stub-checks-pattern + sub-article-front-stub-checks-pattern + + + + + + + + sub-article-doi-checks-pattern + sub-article-doi-checks-pattern + + + @@ -1264,7 +1282,7 @@ arxiv-journal-meta-checks-pattern - + @@ -1273,7 +1291,7 @@ arxiv-doi-checks-pattern - + @@ -1282,7 +1300,7 @@ res-square-journal-meta-checks-pattern - + @@ -1291,7 +1309,7 @@ res-square-doi-checks-pattern - + @@ -1300,7 +1318,7 @@ psyarxiv-journal-meta-checks-pattern - + @@ -1309,7 +1327,7 @@ psyarxiv-doi-checks-pattern - + @@ -1318,7 +1336,7 @@ osf-journal-meta-checks-pattern - + @@ -1327,7 +1345,7 @@ osf-doi-checks-pattern - + @@ -1336,7 +1354,7 @@ ecoevorxiv-journal-meta-checks-pattern - + @@ -1345,7 +1363,7 @@ ecoevorxiv-doi-checks-pattern - + @@ -1354,7 +1372,7 @@ authorea-journal-meta-checks-pattern - + @@ -1363,7 +1381,7 @@ authorea-doi-checks-pattern - + @@ -7327,9 +7345,77 @@ + + + + + + + + + + sub-article-front-stub-check-1 + error + + + + [sub-article-front-stub-check-1] Sub-article must have one (and only one) <article-id pub-id-type="doi"> element. This one does not. + + + + + + + + + + + + + + + + + + + sub-article-doi-check-1 + error + + + + [sub-article-doi-check-1] The DOI for this sub-article does not match the permitted format: + + . + + + + + + + + + sub-article-doi-check-2 + error + + + + [sub-article-doi-check-2] The DOI for this sub-article ( + + ) does not start with the version DOI for the Reviewed Preprint ( + + ). + + + + + + + + + - + @@ -7401,15 +7487,15 @@ - + - - - + + + - + @@ -7427,15 +7513,15 @@ - + - - - + + + - + @@ -7507,15 +7593,15 @@ - + - - - + + + - + @@ -7533,15 +7619,15 @@ - + - - - + + + - + @@ -7599,15 +7685,15 @@ - + - - - + + + - + @@ -7625,15 +7711,15 @@ - + - - - + + + - + @@ -7691,15 +7777,15 @@ - + - - - + + + - + @@ -7717,15 +7803,15 @@ - + - - - + + + - + @@ -7783,15 +7869,15 @@ - + - - - + + + - + @@ -7809,15 +7895,15 @@ - + - - - + + + - + @@ -7875,15 +7961,15 @@ - + - - - + + + - + @@ -7901,10 +7987,10 @@ - + - - - + + + \ No newline at end of file diff --git a/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/fail.xml b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/fail.xml new file mode 100644 index 0000000000..fabc652913 --- /dev/null +++ b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/fail.xml @@ -0,0 +1,16 @@ + + + +
+ + 10.7554/eLife.123456.1 + + + + 10.7554/eLife.123456.1.sdsadsa0 + + +
+
\ No newline at end of file diff --git a/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/pass.xml b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/pass.xml new file mode 100644 index 0000000000..74e1ad1669 --- /dev/null +++ b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/pass.xml @@ -0,0 +1,16 @@ + + + +
+ + 10.7554/eLife.123456.1 + + + + 10.7554/eLife.123456.1.sa0 + + +
+
\ No newline at end of file diff --git a/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/sub-article-doi-check-1.sch b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/sub-article-doi-check-1.sch new file mode 100644 index 0000000000..3b1b2c9110 --- /dev/null +++ b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-1/sub-article-doi-check-1.sch @@ -0,0 +1,158 @@ + + eLife reviewed preprint schematron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [sub-article-doi-check-1] The DOI for this sub-article does not match the permitted format: . + + + + + sub-article/front-stub/article-id[@pub-id-type='doi'] must be present. + + + \ No newline at end of file diff --git a/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/fail.xml b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/fail.xml new file mode 100644 index 0000000000..667c8fb8e5 --- /dev/null +++ b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/fail.xml @@ -0,0 +1,16 @@ + + + +
+ + 10.7554/eLife.123456.1 + + + + 10.7554/eLife.123456.2.sa0 + + +
+
\ No newline at end of file diff --git a/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/pass.xml b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/pass.xml new file mode 100644 index 0000000000..56799a1530 --- /dev/null +++ b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/pass.xml @@ -0,0 +1,16 @@ + + + +
+ + 10.7554/eLife.123456.1 + + + + 10.7554/eLife.123456.1.sa0 + + +
+
\ No newline at end of file diff --git a/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/sub-article-doi-check-2.sch b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/sub-article-doi-check-2.sch new file mode 100644 index 0000000000..b076b952ed --- /dev/null +++ b/test/tests/rp/sub-article-doi-checks/sub-article-doi-check-2/sub-article-doi-check-2.sch @@ -0,0 +1,158 @@ + + eLife reviewed preprint schematron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [sub-article-doi-check-2] The DOI for this sub-article () does not start with the version DOI for the Reviewed Preprint (). + + + + + sub-article/front-stub/article-id[@pub-id-type='doi'] must be present. + + + \ No newline at end of file diff --git a/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/fail.xml b/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/fail.xml new file mode 100644 index 0000000000..4fc0e3af54 --- /dev/null +++ b/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/fail.xml @@ -0,0 +1,14 @@ + + + +
+ + 10.7554/eLife.123456.1 + + + + +
+
\ No newline at end of file diff --git a/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/pass.xml b/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/pass.xml new file mode 100644 index 0000000000..08ae954409 --- /dev/null +++ b/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/pass.xml @@ -0,0 +1,16 @@ + + + +
+ + 10.7554/eLife.123456.1 + + + + 10.7554/eLife.123456.1.sa0 + + +
+
\ No newline at end of file diff --git a/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/sub-article-front-stub-check-1.sch b/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/sub-article-front-stub-check-1.sch new file mode 100644 index 0000000000..ca77be2e2f --- /dev/null +++ b/test/tests/rp/sub-article-front-stub-checks/sub-article-front-stub-check-1/sub-article-front-stub-check-1.sch @@ -0,0 +1,157 @@ + + eLife reviewed preprint schematron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [sub-article-front-stub-check-1] Sub-article must have one (and only one) <article-id pub-id-type="doi"> element. This one does not. + + + + + sub-article/front-stub must be present. + + + \ No newline at end of file diff --git a/test/xspec/rp-schematron.sch b/test/xspec/rp-schematron.sch index 40e6a1f08e..3ef0cbc38a 100644 --- a/test/xspec/rp-schematron.sch +++ b/test/xspec/rp-schematron.sch @@ -1445,6 +1445,19 @@
+ + + Sub-article must have one (and only one) <article-id pub-id-type="doi"> element. This one does not. + + + + + + The DOI for this sub-article does not match the permitted format: . + + The DOI for this sub-article () does not start with the version DOI for the Reviewed Preprint (). + + @@ -1664,6 +1677,8 @@ sub-article[@article-type='editor-report']/body/p[1]//bold must be present. sub-article[@article-type='author-comment']/body//bold[not(preceding-sibling::text() or preceding-sibling::*) and (parent::p/following-sibling::*[1]/ext-link/inline-graphic or parent::p/following-sibling::*[2]/ext-link/inline-graphic)] must be present. sub-article/front-stub/title-group/article-title must be present. + sub-article/front-stub must be present. + sub-article/front-stub/article-id[@pub-id-type='doi'] must be present. article/front/journal-meta[lower-case(journal-id[1])='arxiv'] must be present. article/front[journal-meta[lower-case(journal-id[1])='arxiv']]/article-meta/article-id[@pub-id-type='doi'] must be present. article/front/journal-meta[lower-case(journal-id[1])='rs'] must be present. diff --git a/test/xspec/rp-schematron.xspec b/test/xspec/rp-schematron.xspec index f7a6cd4b3b..3162594bbb 100644 --- a/test/xspec/rp-schematron.xspec +++ b/test/xspec/rp-schematron.xspec @@ -3496,6 +3496,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +