From 6efc0a40e5db1ccdcde9f011cc4238a145c011a7 Mon Sep 17 00:00:00 2001 From: Alex Stuart Date: Tue, 14 Apr 2020 11:01:42 +0100 Subject: [PATCH] Add UK-specific check for SPs asserting REFEDS R&S entity category This check ensures that entities asserting the entity category have a RegistrationPolicy element. Other checks ensure that this entity is an SP, and that the value in the RegistrationPolicy element is valid. The check is integrated as part of uk_registeredEntities See ukf/ukf-meta#226 for details --- mdx/uk/beans.xml | 8 ++++ mdx/uk/check_uk_rands.xsl | 45 +++++++++++++++++++ tests/manual/ukf-meta-226/README.md | 9 ++++ .../manual/ukf-meta-226/has-ec-has-policy.xml | 18 ++++++++ .../manual/ukf-meta-226/has-ec-no-policy.xml | 16 +++++++ .../manual/ukf-meta-226/no-ec-has-policy.xml | 13 ++++++ tests/manual/ukf-meta-226/no-ec-no-policy.xml | 5 +++ .../ukf-meta-226/sirtfi-ec-no-policy.xml | 18 ++++++++ 8 files changed, 132 insertions(+) create mode 100644 mdx/uk/check_uk_rands.xsl create mode 100644 tests/manual/ukf-meta-226/README.md create mode 100644 tests/manual/ukf-meta-226/has-ec-has-policy.xml create mode 100644 tests/manual/ukf-meta-226/has-ec-no-policy.xml create mode 100644 tests/manual/ukf-meta-226/no-ec-has-policy.xml create mode 100644 tests/manual/ukf-meta-226/no-ec-no-policy.xml create mode 100644 tests/manual/ukf-meta-226/sirtfi-ec-no-policy.xml diff --git a/mdx/uk/beans.xml b/mdx/uk/beans.xml index ffb17957..fa164dcb 100644 --- a/mdx/uk/beans.xml +++ b/mdx/uk/beans.xml @@ -302,6 +302,13 @@ + + + + + + + + + + + + + SP asserts R&S entity category but has no RegistrationPolicy element. + + + + + + diff --git a/tests/manual/ukf-meta-226/README.md b/tests/manual/ukf-meta-226/README.md new file mode 100644 index 00000000..5924db64 --- /dev/null +++ b/tests/manual/ukf-meta-226/README.md @@ -0,0 +1,9 @@ +# Tests for UK-specific check for R and S + +If the entity asserts R&S, it must have a RegistrationPolicy + +Other checks ensure that the RegistrationPolicy is valid + +Run tests like this: + +`for i in *.xml; do echo "Test: $i ==="; xsltproc ../../../mdx/uk/check_uk_rands.xsl $i; done` diff --git a/tests/manual/ukf-meta-226/has-ec-has-policy.xml b/tests/manual/ukf-meta-226/has-ec-has-policy.xml new file mode 100644 index 00000000..f5f2ae0f --- /dev/null +++ b/tests/manual/ukf-meta-226/has-ec-has-policy.xml @@ -0,0 +1,18 @@ + + + + + http://ukfederation.org.uk/doc/mdrps-20130902 + + + + http://refeds.org/category/research-and-scholarship + + + + diff --git a/tests/manual/ukf-meta-226/has-ec-no-policy.xml b/tests/manual/ukf-meta-226/has-ec-no-policy.xml new file mode 100644 index 00000000..85474807 --- /dev/null +++ b/tests/manual/ukf-meta-226/has-ec-no-policy.xml @@ -0,0 +1,16 @@ + + + + + + + + http://refeds.org/category/research-and-scholarship + + + + diff --git a/tests/manual/ukf-meta-226/no-ec-has-policy.xml b/tests/manual/ukf-meta-226/no-ec-has-policy.xml new file mode 100644 index 00000000..c82a2c97 --- /dev/null +++ b/tests/manual/ukf-meta-226/no-ec-has-policy.xml @@ -0,0 +1,13 @@ + + + + + http://ukfederation.org.uk/doc/mdrps-20130902 + + + diff --git a/tests/manual/ukf-meta-226/no-ec-no-policy.xml b/tests/manual/ukf-meta-226/no-ec-no-policy.xml new file mode 100644 index 00000000..7d9301f7 --- /dev/null +++ b/tests/manual/ukf-meta-226/no-ec-no-policy.xml @@ -0,0 +1,5 @@ + + diff --git a/tests/manual/ukf-meta-226/sirtfi-ec-no-policy.xml b/tests/manual/ukf-meta-226/sirtfi-ec-no-policy.xml new file mode 100644 index 00000000..1bf29ae2 --- /dev/null +++ b/tests/manual/ukf-meta-226/sirtfi-ec-no-policy.xml @@ -0,0 +1,18 @@ + + + + + http://ukfederation.org.uk/doc/mdrps-20130902 + + + + https://refeds.org/sirtfi + + + +