Open dockmd opened 1 month ago
I'm not certain about issue 1, see notes under the tests, but aside from that fixes look good
eark-validator /eark-test-corpus/eark-ip-test-corpus/corpus/CSIP/CSIP20/valid/IP_18000_CSIP20_1
Warning severity message reported.
{
"rule_id": "CSIP20",
"severity": "Warning",
"location": {
"context": "/mets:mets/mets:dmdSec",
"test": "@STATUS",
"description": "/*[local-name()='mets' and namespace-uri()='http://www.loc.gov/METS/']/*[local-name()='dmdSec' and namespace-uri()='http://www.loc.gov/METS/']"
},
"message": "SHOULD be used to indicated the status of the package."
}
No rule for CSIP20
I might be mistaken, but I believe the original behaviour was expected. The validator returns a "Warning" severity message for CSIP20 when no @STATUS attribute is present, which seems consistent with the requirement that the dmdSec "should" have a @STATUS attribute.
eark-validator /eark-test-corpus/eark-ip-test-corpus/corpus/CSIP/CSIP20/invalid/IP_18000_CSIP20_2
Fail: No entry for CSIP20
Pass: Rule reported correctly.
[
{
"rule_id": "CSIP20",
"severity": "Error",
"location": {
"context": "/mets:mets/mets:dmdSec",
"test": "not(@STATUS) or ((@STATUS = 'SUPERSEDED') or (@STATUS = 'CURRENT'))",
"description": "/*[local-name()='mets' and namespace-uri()='http://www.loc.gov/METS/']/*[local-name()='dmdSec' and namespace-uri()='http://www.loc.gov/METS/']"
},
"message": "SHOULD be used to indicated the status of the package."
}
]
eark-validator /eark-test-corpus/eark-ip-test-corpus/corpus/CSIP/CSIP20/valid/IP_18000_CSIP20_5
Pass: No entry for CSIP20
Pass: No entry for CSIP20
eark-validator /eark-test-corpus/eark-ip-test-corpus/corpus/CSIP/CSIP20/invalid/IP_18000_CSIP20_3
Fail: No error entry for CSIP20
Pass: rule reported correctly.
[
{
"rule_id": "CSIP20",
"severity": "Error",
"location": {
"context": "/mets:mets/mets:dmdSec",
"test": "not(@STATUS) or ((@STATUS = 'SUPERSEDED') or (@STATUS = 'CURRENT'))",
"description": "/*[local-name()='mets' and namespace-uri()='http://www.loc.gov/METS/']/*[local-name()='dmdSec' and namespace-uri()='http://www.loc.gov/METS/']"
},
"message": "SHOULD be used to indicated the status of the package."
}
]
@Sunday-Crunk warning with proper severity should be generated now.
There are 3 issues with validating the CSIP20 requirement:
This can be seen when testing rule 1, package "IP_18000_CSIP20_1" and rule 2, packages "IP_18000_CSIP20_2" and "IP_18000_CSIP20_3" from testCase.xml