From 3c814abd4a6d80f3ba755cdef62e099b6054360a Mon Sep 17 00:00:00 2001 From: Fred Atherden <43879983+fred-atherden@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:22:58 +0000 Subject: [PATCH] RP - add equal-contrib checks --- src/rp-schematron-base.sch | 8 + src/rp-schematron.sch | 4 + src/rp-schematron.xsl | 26 +++ .../author-equal-contrib-1.sch | 157 ++++++++++++++++++ .../author-equal-contrib-1/fail.xml | 22 +++ .../author-equal-contrib-1/pass.xml | 22 +++ .../author-equal-contrib-2.sch | 157 ++++++++++++++++++ .../author-equal-contrib-2/fail.xml | 21 +++ .../author-equal-contrib-2/pass.xml | 22 +++ test/xspec/rp-schematron.sch | 4 + test/xspec/rp-schematron.xspec | 20 +++ 11 files changed, 463 insertions(+) create mode 100644 test/tests/rp/author-corresp-checks/author-equal-contrib-1/author-equal-contrib-1.sch create mode 100644 test/tests/rp/author-corresp-checks/author-equal-contrib-1/fail.xml create mode 100644 test/tests/rp/author-corresp-checks/author-equal-contrib-1/pass.xml create mode 100644 test/tests/rp/author-corresp-checks/author-equal-contrib-2/author-equal-contrib-2.sch create mode 100644 test/tests/rp/author-corresp-checks/author-equal-contrib-2/fail.xml create mode 100644 test/tests/rp/author-corresp-checks/author-equal-contrib-2/pass.xml diff --git a/src/rp-schematron-base.sch b/src/rp-schematron-base.sch index 779aba7287..7b98ce8450 100644 --- a/src/rp-schematron-base.sch +++ b/src/rp-schematron-base.sch @@ -235,6 +235,14 @@ Author does not have the attribute corresp="yes", but they have a child email element or an xref with the attribute ref-type="corresp". + + Author does not have the attribute equal-contrib="yes", but they have a child xref element that points to a footnote with the fn-type 'equal'. + + Author has the attribute equal-contrib="yes", but they do not have a child xref element that points to a footnote with the fn-type 'equal'. diff --git a/src/rp-schematron.sch b/src/rp-schematron.sch index 780952b2bb..c2b887ffdf 100644 --- a/src/rp-schematron.sch +++ b/src/rp-schematron.sch @@ -187,6 +187,10 @@ [author-corresp-no-email] Author has the attribute corresp="yes", but they do not have a child email element or an xref with the attribute ref-type="corresp". [author-email-no-corresp] Author does not have the attribute corresp="yes", but they have a child email element or an xref with the attribute ref-type="corresp". + + [author-equal-contrib-1] Author does not have the attribute equal-contrib="yes", but they have a child xref element that points to a footnote with the fn-type 'equal'. + + [author-equal-contrib-2] Author has the attribute equal-contrib="yes", but they do not have a child xref element that points to a footnote with the fn-type 'equal'. [surname-test-1] Each name must contain only one surname. diff --git a/src/rp-schematron.xsl b/src/rp-schematron.xsl index 2461211763..90e1cf17b9 100644 --- a/src/rp-schematron.xsl +++ b/src/rp-schematron.xsl @@ -1505,6 +1505,32 @@ does not have the attribute corresp="yes", but they have a child email element or an xref with the attribute ref-type="corresp". + + + + author-equal-contrib-1 + error + + + + [author-equal-contrib-1] Author + + does not have the attribute equal-contrib="yes", but they have a child xref element that points to a footnote with the fn-type 'equal'. + + + + + + author-equal-contrib-2 + error + + + + [author-equal-contrib-2] Author + + has the attribute equal-contrib="yes", but they do not have a child xref element that points to a footnote with the fn-type 'equal'. + + diff --git a/test/tests/rp/author-corresp-checks/author-equal-contrib-1/author-equal-contrib-1.sch b/test/tests/rp/author-corresp-checks/author-equal-contrib-1/author-equal-contrib-1.sch new file mode 100644 index 0000000000..4e27aa5224 --- /dev/null +++ b/test/tests/rp/author-corresp-checks/author-equal-contrib-1/author-equal-contrib-1.sch @@ -0,0 +1,157 @@ + + eLife reviewed preprint schematron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [author-equal-contrib-1] Author does not have the attribute equal-contrib="yes", but they have a child xref element that points to a footnote with the fn-type 'equal'. + + + + + contrib[@contrib-type='author'] must be present. + + + \ No newline at end of file diff --git a/test/tests/rp/author-corresp-checks/author-equal-contrib-1/fail.xml b/test/tests/rp/author-corresp-checks/author-equal-contrib-1/fail.xml new file mode 100644 index 0000000000..ffe6198311 --- /dev/null +++ b/test/tests/rp/author-corresp-checks/author-equal-contrib-1/fail.xml @@ -0,0 +1,22 @@ + + + +
+ + + + + Claus + Santa + + * + + + + + + +
+
\ No newline at end of file diff --git a/test/tests/rp/author-corresp-checks/author-equal-contrib-1/pass.xml b/test/tests/rp/author-corresp-checks/author-equal-contrib-1/pass.xml new file mode 100644 index 0000000000..7c49435749 --- /dev/null +++ b/test/tests/rp/author-corresp-checks/author-equal-contrib-1/pass.xml @@ -0,0 +1,22 @@ + + + +
+ + + + + Claus + Santa + + * + + + + + + +
+
\ No newline at end of file diff --git a/test/tests/rp/author-corresp-checks/author-equal-contrib-2/author-equal-contrib-2.sch b/test/tests/rp/author-corresp-checks/author-equal-contrib-2/author-equal-contrib-2.sch new file mode 100644 index 0000000000..097ba325e5 --- /dev/null +++ b/test/tests/rp/author-corresp-checks/author-equal-contrib-2/author-equal-contrib-2.sch @@ -0,0 +1,157 @@ + + eLife reviewed preprint schematron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [author-equal-contrib-2] Author has the attribute equal-contrib="yes", but they do not have a child xref element that points to a footnote with the fn-type 'equal'. + + + + + contrib[@contrib-type='author'] must be present. + + + \ No newline at end of file diff --git a/test/tests/rp/author-corresp-checks/author-equal-contrib-2/fail.xml b/test/tests/rp/author-corresp-checks/author-equal-contrib-2/fail.xml new file mode 100644 index 0000000000..3b41c4e5bb --- /dev/null +++ b/test/tests/rp/author-corresp-checks/author-equal-contrib-2/fail.xml @@ -0,0 +1,21 @@ + + + +
+ + + + + Claus + Santa + + + + + + + +
+
\ No newline at end of file diff --git a/test/tests/rp/author-corresp-checks/author-equal-contrib-2/pass.xml b/test/tests/rp/author-corresp-checks/author-equal-contrib-2/pass.xml new file mode 100644 index 0000000000..0c6a5902a8 --- /dev/null +++ b/test/tests/rp/author-corresp-checks/author-equal-contrib-2/pass.xml @@ -0,0 +1,22 @@ + + + +
+ + + + + Claus + Santa + + * + + + + + + +
+
\ No newline at end of file diff --git a/test/xspec/rp-schematron.sch b/test/xspec/rp-schematron.sch index 601802fea4..d25ca8236d 100644 --- a/test/xspec/rp-schematron.sch +++ b/test/xspec/rp-schematron.sch @@ -199,6 +199,10 @@ Author has the attribute corresp="yes", but they do not have a child email element or an xref with the attribute ref-type="corresp". Author does not have the attribute corresp="yes", but they have a child email element or an xref with the attribute ref-type="corresp". + + Author does not have the attribute equal-contrib="yes", but they have a child xref element that points to a footnote with the fn-type 'equal'. + + Author has the attribute equal-contrib="yes", but they do not have a child xref element that points to a footnote with the fn-type 'equal'.
diff --git a/test/xspec/rp-schematron.xspec b/test/xspec/rp-schematron.xspec index 2b045a7acf..af6d778db4 100644 --- a/test/xspec/rp-schematron.xspec +++ b/test/xspec/rp-schematron.xspec @@ -109,6 +109,26 @@ + + + + + + + + + + + + + + + + + + + +