From ca65caa2d93debe4802910cf0e2605ea9ca7c03f Mon Sep 17 00:00:00 2001 From: Fred Atherden <43879983+fred-atherden@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:58:01 +0000 Subject: [PATCH] Add ext-link check --- src/final-JATS-schematron.sch | 2 + src/final-JATS-schematron.xsl | 14 + src/final-package-JATS-schematron.sch | 2 + src/pre-JATS-schematron.sch | 2 + src/pre-JATS-schematron.xsl | 14 + src/schematron.sch | 4 + .../ext-link-tests/kriya-ext-link/fail.xml | 9 + .../kriya-ext-link/kriya-ext-link.sch | 1306 +++++++++++++++++ .../ext-link-tests/kriya-ext-link/pass.xml | 9 + test/xspec/schematron.sch | 2 + test/xspec/schematron.xspec | 10 + 11 files changed, 1374 insertions(+) create mode 100644 test/tests/gen/ext-link-tests/kriya-ext-link/fail.xml create mode 100644 test/tests/gen/ext-link-tests/kriya-ext-link/kriya-ext-link.sch create mode 100644 test/tests/gen/ext-link-tests/kriya-ext-link/pass.xml diff --git a/src/final-JATS-schematron.sch b/src/final-JATS-schematron.sch index 80befdc6ac..546f8c638f 100644 --- a/src/final-JATS-schematron.sch +++ b/src/final-JATS-schematron.sch @@ -2595,6 +2595,8 @@ [ext-link-child-test-5] ext-link looks like it points to a review dryad dataset - . Should it be updated? [ext-link-text] The text for a URL is '' (which looks like a URL), but it is not the same as the actual embedded link, which is ''. + + [kriya-ext-link] URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - . diff --git a/src/final-JATS-schematron.xsl b/src/final-JATS-schematron.xsl index 599bf9f588..b15e3c1188 100644 --- a/src/final-JATS-schematron.xsl +++ b/src/final-JATS-schematron.xsl @@ -14043,6 +14043,20 @@ '. + + + + + kriya-ext-link + error + + + + [kriya-ext-link] URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - + + . + + diff --git a/src/final-package-JATS-schematron.sch b/src/final-package-JATS-schematron.sch index 82b8de88cf..288b242546 100644 --- a/src/final-package-JATS-schematron.sch +++ b/src/final-package-JATS-schematron.sch @@ -2601,6 +2601,8 @@ ext-link looks like it points to a review dryad dataset - . Should it be updated? The text for a URL is '' (which looks like a URL), but it is not the same as the actual embedded link, which is ''. + + URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - . diff --git a/src/pre-JATS-schematron.sch b/src/pre-JATS-schematron.sch index 357830727e..747a948580 100644 --- a/src/pre-JATS-schematron.sch +++ b/src/pre-JATS-schematron.sch @@ -2540,6 +2540,8 @@ [ext-link-child-test-5] ext-link looks like it points to a review dryad dataset - . Should it be updated? [ext-link-text] The text for a URL is '' (which looks like a URL), but it is not the same as the actual embedded link, which is ''. + + [kriya-ext-link] URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - . diff --git a/src/pre-JATS-schematron.xsl b/src/pre-JATS-schematron.xsl index 3d136bb1eb..685a76fa4d 100644 --- a/src/pre-JATS-schematron.xsl +++ b/src/pre-JATS-schematron.xsl @@ -13928,6 +13928,20 @@ '. + + + + + kriya-ext-link + error + + + + [kriya-ext-link] URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - + + . + + diff --git a/src/schematron.sch b/src/schematron.sch index 2781b322c1..ed6811c3d8 100644 --- a/src/schematron.sch +++ b/src/schematron.sch @@ -3971,6 +3971,10 @@ else self::*/local-name() = $allowed-p-blocks" test="(.!=@xlink:href) and matches(.,'https?:|ftp:|www\.')" role="warning" id="ext-link-text">The text for a URL is '' (which looks like a URL), but it is not the same as the actual embedded link, which is ''. + + URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - . + + +
+ test +
+
\ No newline at end of file diff --git a/test/tests/gen/ext-link-tests/kriya-ext-link/kriya-ext-link.sch b/test/tests/gen/ext-link-tests/kriya-ext-link/kriya-ext-link.sch new file mode 100644 index 0000000000..6f2a0565be --- /dev/null +++ b/test/tests/gen/ext-link-tests/kriya-ext-link/kriya-ext-link.sch @@ -0,0 +1,1306 @@ + + eLife Schematron + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cite + + + + + + + + + + + box + + + + + + + + + + + + + + + + + + + + + roman + + + + + + + + + + + + + + roman + + + + + + + italic + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - . + + + + + ext-link[@ext-link-type='uri'] must be present. + + + \ No newline at end of file diff --git a/test/tests/gen/ext-link-tests/kriya-ext-link/pass.xml b/test/tests/gen/ext-link-tests/kriya-ext-link/pass.xml new file mode 100644 index 0000000000..0185ae0dd2 --- /dev/null +++ b/test/tests/gen/ext-link-tests/kriya-ext-link/pass.xml @@ -0,0 +1,9 @@ + + + +
+ test +
+
\ No newline at end of file diff --git a/test/xspec/schematron.sch b/test/xspec/schematron.sch index de6a20181c..1c35c32f94 100644 --- a/test/xspec/schematron.sch +++ b/test/xspec/schematron.sch @@ -3059,6 +3059,8 @@ ext-link looks like it points to a review dryad dataset - . Should it be updated? The text for a URL is '' (which looks like a URL), but it is not the same as the actual embedded link, which is ''. + + URL contains 'kriyadocs.com', so it looks like a link to kriya which must be incorrect - .
diff --git a/test/xspec/schematron.xspec b/test/xspec/schematron.xspec index 820572a5b8..55d7669fa9 100644 --- a/test/xspec/schematron.xspec +++ b/test/xspec/schematron.xspec @@ -4427,6 +4427,16 @@ + + + + + + + + + +