E-ARK-Software / py-rest-ip-validator

Flask wrapping for Information Package validation from eatb
Apache License 2.0
1 stars 2 forks source link

Schematron rule for CSIP5 gives false error if CSIP4 is not present #26

Open koit opened 4 years ago

koit commented 4 years ago

In the Schematron rules for mets root, CSIP5 does not allow for optionality of CSIP4.

CSIP4 (@csip:CONTENTINFORMATIONTYPE) is a SHOULD requirement for package level METS documents, but the current syntax for CSIP5 fails if @csip:CONTENTINFORMATIONTYPE does not exist.

<rule context="/mets:mets">
  <assert id="CSIP5" role="ERROR" test="(@csip:CONTENTINFORMATIONTYPE = 'OTHER' and @csip:OTHERCONTENTINFORMATIONTYPE) or @csip:CONTENTINFORMATIONTYPE != 'OTHER'">When the mets/@csip:CONTENTINFORMATIONTYPE has the value “OTHER” the mets/@csip:OTHERCONTENTINFORMATIONTYPE must state the content information type.</assert>
</rule>