You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:keywordgco:nilReason="missing"/>
<gmd:keyword />
<gmd:keyword>
<gco:CharacterString>Nautical Charting</gco:CharacterString>
</gmd:keyword>
<!-- use case 2 (valid) -->
<gmd:keywordgco:nilReason="missing"/>
<!-- use case 3 (invalid) -->
<gmd:keyword />
<!-- use case 4 (invalid) -->
<gmd:keywordgco: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:keywordgco: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
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
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)
The text was updated successfully, but these errors were encountered: