Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow other constraint to be filled #356

Open
wants to merge 2 commits into
base: 3.12.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
<SecurityNoteMismatchedBothLang>Value mismatched for Security User Note in both languages</SecurityNoteMismatchedBothLang>
<SecurityClassificationUserNote>Security User Note is not valid for the classification code selected. Valid values are:</SecurityClassificationUserNote>
<SecurityClassificationUserNoteEmpty>Security User Note should be empty for the classification code selected</SecurityClassificationUserNoteEmpty>
<OtherConstraintsNote>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.</OtherConstraintsNote>
<OtherConstraintsNote>If you have indicated 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, the ‘Other constraints' text box must be completed.</OtherConstraintsNote>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not use MS special characters for quote

image

Copy link
Contributor

@ianwallen ianwallen Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should " text box must be completed" changed to " text box must be filled".

I don't believe completed the the correct term for filling in a form?

Or it could be rewritten to the following

If you have indicated 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, ensure to provide information for 'Other Constraints' field.

<OtherConstraintsNoteEmpty>If you did not indicate 'Other Restrictions' in either the 'Access Constraints' or 'Use Constraints' fields, the ‘Other constraints’ text box must be empty.</OtherConstraintsNoteEmpty>
<UseLimitation>Value is required for Use Limitation in both languages</UseLimitation>

<ContactOrganisationName>Contact - Organization name is required in both languages</ContactOrganisationName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
<SecurityNoteMismatchedBothLang>Valeur non concordante pour la note d'utilisateur de sécurité dans les deux langues</SecurityNoteMismatchedBothLang>
<SecurityClassificationUserNote>Explications sur les restrictions n’est pas valide pour la restriction de manipulation. Les valeurs valides sont :</SecurityClassificationUserNote>
<SecurityClassificationUserNoteEmpty>Explications sur les restrictions devrait être vide pour la restriction de manipulation</SecurityClassificationUserNoteEmpty>
<OtherConstraintsNote>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.</OtherConstraintsNote>
<OtherConstraintsNote>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.</OtherConstraintsNote>
<OtherConstraintsNoteEmpty>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.</OtherConstraintsNoteEmpty>
<UseLimitation>Limitation d'utilisation est obligatoire dans les deux langues</UseLimitation>

<ContactOrganisationName>Contact - Nom de l'organisation est obligatoire dans les deux langues</ContactOrganisationName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,13 +741,22 @@
and (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609'
or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609')) or

(../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609'
Copy link
Contributor

@ianwallen ianwallen Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the extra or condition which seem to indicate that if the other constraints is not specified in 'Access Constraints' or 'Use Constraints' then it is ok to add other constraints. I don't believe this correct...

I believe the user can only add other constraints if they specify other constraints in 'Access Constraints' or 'Use Constraints'

and ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609'
)" />
<sch:let name="emptyFine" value="(
(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')
)" />
or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609')
) or
(../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609'
or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609'))" />
<sch:assert
test="$filledFine"
>$loc/strings/OtherConstraintsNote</sch:assert>
<sch:assert
test="$emptyFine"
>$loc/strings/OtherConstraintsNoteEmpty</sch:assert>

</sch:rule>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,23 @@
and (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609'
or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609')) or

(../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609'
and ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609'
))" />
<sch:let name="emptyFine" value="(
(not(string(gco:CharacterString))
and (../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609'
and ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609')
))" />
or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue != 'RI_609')
) or
(../gmd:accessConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609'
or ../gmd:useConstraints/gmd:MD_RestrictionCode/@codeListValue = 'RI_609')
)" />
<sch:assert
test="$filledFine"
>$loc/strings/OtherConstraintsNote</sch:assert>
<sch:assert
test="$emptyFine"
>$loc/strings/OtherConstraintsNoteEmpty</sch:assert>
</sch:rule>

<sch:rule context="//gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_SecurityConstraints/gmd:userNote">
Expand Down