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

here's a breakdown of use cases for a required element ( i.e. keyword ) which can occur many times ( i.e. unbounded ). the minimum number of occurrences is 1. we're also allowing an acceptable gco:nilReason as an exception to the requirement rule by simply skipping them during processing. #147

Open
shuvosarker22 opened this issue Oct 30, 2024 · 1 comment

Comments

@shuvosarker22
Copy link

          here's a breakdown of use cases for a required element ( i.e. `keyword` ) which can occur many times ( i.e. `unbounded` ). the minimum number of occurrences is 1. we're also allowing an acceptable `gco:nilReason` as an exception to the requirement rule by  simply skipping them during processing. 
<!-- use case 1 (valid) -->
<gmd:keyword gco:nilReason="missing"/>
<gmd:keyword />
<gmd:keyword>
  <gco:CharacterString>Nautical Charting</gco:CharacterString>
</gmd:keyword>  

<!-- use case 2 (valid) -->
<gmd:keyword gco:nilReason="missing"/>

<!-- use case 3 (invalid) -->
<gmd:keyword />

<!-- use case 4 (invalid) -->
<gmd:keyword gco:nilReason="missing"/>
<gmd:keyword />

<!-- use case 5 (valid) -->
<gmd:keyword>
  <gco:CharacterString>Nautical Charting</gco:CharacterString>
</gmd:keyword>  

<!-- use case 6 (valid) -->
<gmd:keyword />
<gmd:keyword>
  <gco:CharacterString>Nautical Charting</gco:CharacterString>
</gmd:keyword> 

<!-- use case 7 (invalid) -->
<gmd:keyword gco:nilReason="invalid nil reason"/>

one easy approach to this problem is to simply complain if the document doesn't have at least 1 valid keyword. anything else is invalid. however, that breaks our rule of considering gco:nilReason

<gmd:keyword>
  <gco:CharacterString>Nautical Charting</gco:CharacterString>
</gmd:keyword> 

another approach would be to check if there's at least 1 valid element or 1 element with an acceptable nilReason?

Originally posted by @rshewitt in GSA/data.gov#4924 (comment)

@rshewitt
Copy link

rshewitt commented Oct 30, 2024

@GSA/data-gov-dev-team delete this. i don't have permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants