From e57bab6da1f2fb5715ede7077a3e97a923a00857 Mon Sep 17 00:00:00 2001 From: WANGF Date: Thu, 31 Aug 2023 16:35:16 -0400 Subject: [PATCH 1/2] allow other constraint to be filled --- .../schematron/schematron-rules-multilingual.sch | 5 ++--- .../schematron/schematron-rules-non-multilingual.sch | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch b/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch index 77148154..0fea9429 100644 --- a/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch +++ b/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch @@ -741,9 +741,8 @@ and (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609' or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609')) or - (not(string(gco:CharacterString)) and not(string(gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale=concat('#', $altLanguageId)])) - and (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' - and ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609') + (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' + and ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' )" /> Date: Mon, 16 Oct 2023 13:49:47 -0400 Subject: [PATCH 2/2] Fix logic flaw in constraint fields validation --- .../loc/eng/schematron-rules-multilingual.xml | 3 ++- .../loc/fre/schematron-rules-multilingual.xml | 3 ++- .../schematron/schematron-rules-multilingual.sch | 10 ++++++++++ .../schematron/schematron-rules-non-multilingual.sch | 11 +++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/main/plugin/iso19139.ca.HNAP/loc/eng/schematron-rules-multilingual.xml b/src/main/plugin/iso19139.ca.HNAP/loc/eng/schematron-rules-multilingual.xml index 4e71365e..3f3b9513 100644 --- a/src/main/plugin/iso19139.ca.HNAP/loc/eng/schematron-rules-multilingual.xml +++ b/src/main/plugin/iso19139.ca.HNAP/loc/eng/schematron-rules-multilingual.xml @@ -45,7 +45,8 @@ Value mismatched for Security User Note in both languages Security User Note is not valid for the classification code selected. Valid values are: Security User Note should be empty for the classification code selected - If you indicate 'Other Restrictions' in the 'Access Constraints' or 'Use Constraints' fields, the other constraints for accessing or using the resource should be explained here. + If you have indicated 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, the ‘Other constraints' text box must be completed. + If you did not indicate 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, the ‘Other constraints’ text box must be empty. Value is required for Use Limitation in both languages Contact - Organization name is required in both languages diff --git a/src/main/plugin/iso19139.ca.HNAP/loc/fre/schematron-rules-multilingual.xml b/src/main/plugin/iso19139.ca.HNAP/loc/fre/schematron-rules-multilingual.xml index c51b4128..f5c0c830 100644 --- a/src/main/plugin/iso19139.ca.HNAP/loc/fre/schematron-rules-multilingual.xml +++ b/src/main/plugin/iso19139.ca.HNAP/loc/fre/schematron-rules-multilingual.xml @@ -45,7 +45,8 @@ Valeur non concordante pour la note d'utilisateur de sécurité dans les deux langues Explications sur les restrictions n’est pas valide pour la restriction de manipulation. Les valeurs valides sont : Explications sur les restrictions devrait être vide pour la restriction de manipulation - Si vous indiquez «Autres restrictions» dans les champs «Contraintes d'accès» ou «Utiliser les contraintes», les autres contraintes d'accès ou d'utilisation de la ressource doivent être expliquées ici. + Si vous avez indiqué « Autres restrictions » dans les champs « Contraintes d'accès » ou « Contraintes d'utilisation », la zone de texte « Autres contraintes » doit être complétée. + Si vous n'avez pas indiqué « Autres restrictions » dans les champs « Contraintes d'accès » ou « Contraintes d'utilisation », la zone de texte « Autres contraintes » doit être vide. Limitation d'utilisation est obligatoire dans les deux langues Contact - Nom de l'organisation est obligatoire dans les deux langues diff --git a/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch b/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch index 0fea9429..8fb6acfb 100644 --- a/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch +++ b/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-multilingual.sch @@ -744,9 +744,19 @@ (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' and ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' )" /> + $loc/strings/OtherConstraintsNote + $loc/strings/OtherConstraintsNoteEmpty diff --git a/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-non-multilingual.sch b/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-non-multilingual.sch index 7a0ae93b..62a4bc57 100644 --- a/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-non-multilingual.sch +++ b/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-non-multilingual.sch @@ -425,9 +425,20 @@ (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' and ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609' ))" /> + $loc/strings/OtherConstraintsNote + $loc/strings/OtherConstraintsNoteEmpty