Skip to content

Commit

Permalink
Merge pull request #48 from E-ARK-Software/FIX/requrements
Browse files Browse the repository at this point in the history
CSIP requirements fix
  • Loading branch information
carlwilson authored Aug 27, 2024
2 parents c20a656 + 9115919 commit 35604c3
Show file tree
Hide file tree
Showing 26 changed files with 2,568 additions and 362 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
<xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="./xhtml1-strict.xsd"/>
<xsd:import namespace="http://www.w3.org/1999/xlink" schemaLocation="./xlink.xsd"/>
<xsd:import namespace="http://www.loc.gov/METS/" schemaLocation="./mets.xsd"/>
<xsd:import namespace="https://DILCIS.eu/XML/METS/CSIPExtensionMETS" schemaLocation="./DILCISExtensionMETS.xsd"/>
</xsd:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@
</rule>
<rule context="/mets:mets/mets:amdSec/mets:digiprovMD">
<assert id="CSIP33" role="ERROR" test="@ID">Mandatory, unique id for the digital provenance.</assert>
<assert id="CSIP34" role="WARN" test="@STATUS">Should be used to indicate the status of the package.</assert>
<assert id="CSIP34_1" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP34_2" role="ERROR" test="not(@STATUS) or (@STATUS_vocabulary_test)">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP35" role="WARN" test="mets:mdRef">Should provide a reference to the digital provenance metadata file stored in the “metadata” section of the IP.</assert>
</rule>
<rule context="/mets:mets/mets:amdSec/mets:digiprovMD/mets:mdRef">
<assert id="CSIP36" role="ERROR" test="@LOCTYPE = 'URL'">Mandatory, locator type is always used with the value “URL” from the vocabulary in the attribute.</assert>
<assert id="CSIP37" role="ERROR" test="@xlink:type = 'simple'">Attribute MUST be used with the value “simple”. Value list is maintained by the xlink standard.</assert>
<assert id="CSIP38" role="ERROR" test="@xlink:href">MUST record the actual location of the resource. This specification recommends recording a URL type filepath within this attribute.</assert>
<assert id="CSIP39" role="ERROR" test="@MDTYPE">MUST record the type of metadata at the referenced location.</assert>
<assert id="CSIP40" role="ERROR" test="@MIMETYPE">MUST record the MIME type of the referenced file.</assert>
<assert id="CSIP40" role="ERROR" test="@MIMETYPE_IANA_test">MUST record the MIME type of the referenced file.</assert>
<assert id="CSIP41" role="ERROR" test="@SIZE">MUST record the size in bytes of the referenced file.</assert>
<assert id="CSIP42" role="ERROR" test="@CREATED">MUST record the date the referenced file was created.</assert>
<assert id="CSIP43" role="ERROR" test="@CHECKSUM">MUST record the checksum of the referenced file.</assert>
<assert id="CSIP44" role="ERROR" test="@CHECKSUMTYPE">MUST record the checksum type of the referenced file.</assert>
</rule>
<rule context="/mets:mets/mets:amdSec/mets:rightsMD">
<assert id="CSIP46" role="ERROR" test="@ID">Mandatory, unique id for the rights metadata.</assert>
<assert id="CSIP47" role="WARN" test="@STATUS">Should be used to indicate the status of the package.</assert>
<assert id="CSIP47_1" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP47_2" role="ERROR" test="not(@STATUS) or (@STATUS_vocabulary_test)">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP48" role="WARN" test="mets:mdRef">Should provide a reference to the digital provenance metadata file stored in the “metadata” section of the IP.</assert>
</rule>
<rule context="/mets:mets/mets:amdSec/mets:rightsMD/mets:mdRef">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
<rule context="/mets:mets/mets:dmdSec">
<assert id="CSIP18" role="ERROR" test="@ID">Mandatory, identifier must be unique within the package.</assert>
<assert id="CSIP19" role="ERROR" test="@CREATED">Mandatory, creation date of the descriptive metadata in this section.</assert>
<assert id="CSIP20" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP20_1" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP20_2" role="ERROR" test="not(@STATUS) or (@STATUS_vocabulary_test)">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP21" role="WARN" test="mets:mdRef">SHOULD provide a reference to the descriptive metadata file located in the “metadata” section of the IP..</assert>
</rule>
<rule context="/mets:mets/mets:dmdSec/mets:mdRef">
<assert id="CSIP22" role="ERROR" test="@LOCTYPE = 'URL'">The locator type is always used with the value “URL” from the vocabulary in the attribute.</assert>
<assert id="CSIP23" role="ERROR" test="@xlink:type = 'simple'">Attribute used with the value “simple”. Value list is maintained by the xlink standard.</assert>
<assert id="CSIP24" role="ERROR" test="@xlink:href">The actual location of the resource. This specification recommends recording a URL type filepath in this attribute.</assert>
<assert id="CSIP25" role="ERROR" test="@MDTYPE">Specifies the type of metadata in the referenced file. Values are taken from the list provided by the METS.</assert>
<assert id="CSIP26" role="ERROR" test="@MIMETYPE">MUST hold the IANA mime type of the referenced file.</assert>
<assert id="CSIP26" role="ERROR" test="@MIMETYPE_IANA_test">MUST hold the IANA mime type of the referenced file.</assert>
<assert id="CSIP27" role="ERROR" test="@SIZE">MUST hold the size of the referenced file in bytes.</assert>
<assert id="CSIP28" role="ERROR" test="@CREATED">MUST hold the creation date of the referenced file.</assert>
<assert id="CSIP29" role="ERROR" test="@CHECKSUM">MUST hold the checksum of the referenced file.</assert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<rule context="/mets:mets/mets:metsHdr">
<assert id="CSIP7" role="ERROR" test="@CREATEDATE">The metsHdr element MUST have a CREATEDATE attribute.</assert>
<assert id="CSIP8" role="WARN" test="@LASTMODDATE">The metsHdr element SHOULD have a LASTMODDATE attribute.</assert>
<assert id="CSIP9" role="ERROR" test="@csip:OAISPACKAGETYPE">The metsHdr element MUST have a csip:OAISPACKAGETYPE attribute.</assert>
<assert id="CSIP9" role="ERROR" test="@csip:OAISPACKAGETYPE_vocabulary_test">The metsHdr element MUST have a csip:OAISPACKAGETYPE attribute.</assert>
<assert id="CSIP10" role="ERROR" test="mets:agent">The metsHdr element MUST contain an agent element that records the software used to create the package.</assert>
<assert id="CSIP11" role="ERROR" test="count(mets:agent[@ROLE = 'CREATOR']) > 0">The agent element MUST have a ROLE attribute with the value "CREATOR".</assert>
</rule>
<rule context="/mets:mets/mets:metsHdr/mets:agent[@ROLE = 'CREATOR']">
<assert id="CSIP12" role="ERROR" test="@TYPE = 'OTHER'">The agent element MUST have a TYPE attribute with the value "OTHER".</assert>
<assert id="CSIP13" role="ERROR" test="@OTHERTYPE = 'SOFTWARE'">The agent element MUST have a OTHERTYPE attribute with the value "SOFTWARE".</assert>
<assert id="CSIP14" role="ERROR" test="mets:name">The agent element MUST have a child name element that records the name of the software tool used to create the IP.</assert>
<assert id="CSIP15" role="ERROR" test="mets:note">The agent element MUST have a child note element that records the version of the tool used to create the IP.</assert>
<assert id="CSIP14" role="ERROR" test="count(mets:name) = 1 and mets:name != ''">The agent element MUST have a child name element that records the name of the software tool used to create the IP.</assert>
<assert id="CSIP15" role="ERROR" test="count(mets:note) = 1 and mets:note != ''">The agent element MUST have a child note element that records the version of the tool used to create the IP.</assert>
<assert id="CSIP16" role="ERROR" test="mets:note[@csip:NOTETYPE='SOFTWARE VERSION']">The mandatory agent element’s note child has a @csip:NOTETYPE attribute with a fixed value of “SOFTWARE VERSION”.</assert>
</rule>
</pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<assert id="CSIP1000" role="ERROR" test="mets:mets">The mets root element is mandatory.</assert>
</rule>
<rule context="/mets:mets">
<assert id="CSIP1" role="ERROR" test="@OBJID">The mets/@OBJID attribute is mandatory, its value is a string identifier for the METS document. For the package METS document, this should be the name/ID of the package, i.e. the name of the package root folder. For a representation level METS document this value records the name/ID of the representation, i.e. the name of the top-level representation folder.</assert>
<assert id="CSIP2" role="ERROR" test="@TYPE">The mets/@TYPE attibute MUST be used to declare the category of the content held in the package, e.g. book, journal, stereograph, video, etc.. Legal values are defined in a fixed vocabulary.</assert>
<assert id="CSIP3" role="WARN" test="(@TYPE = 'OTHER' and @csip:OTHERTYPE) or @TYPE != 'OTHER'">When the content category used falls outside of the defined vocabulary the mets/@TYPE value must be set to “OTHER” and the specific value declared in mets/@csip:OTHERTYPE. The vocabulary will develop under the curation of the DILCIS Board as additional content information type specifications are produced.</assert>
<assert id="CSIP4" role="WARN" test="@csip:CONTENTINFORMATIONTYPE">Used to declare the Content Information Type Specification used when creating the package. Legal values are defined in a fixed vocabulary. The attribute is mandatory for representation level METS documents.</assert>
<assert id="CSIP1" role="ERROR" test="@OBJID != ''">The mets/@OBJID attribute is mandatory, its value is a string identifier for the METS document. For the package METS document, this should be the name/ID of the package, i.e. the name of the package root folder. For a representation level METS document this value records the name/ID of the representation, i.e. the name of the top-level representation folder.</assert>
<assert id="CSIP2" role="ERROR" test="(@TYPE_vocabulary_test) and (@TYPE != 'Other' or (@TYPE = 'Other' and @csip:OTHERTYPE != ''))">The mets/@TYPE attibute MUST be used to declare the category of the content held in the package, e.g. book, journal, stereograph, video, etc.. Legal values are defined in a fixed vocabulary.</assert>
<assert id="CSIP3" role="WARN" test="(@TYPE = 'Other' and @csip:OTHERTYPE) or @TYPE != 'Other'">When the `mets/@TYPE` attribute has the value "Other" the `mets/@csip:OTHERTYPE` attribute MUST be used to declare the content category of the package/representation. The value can either be "Other" or any other string that are not present in the vocabulary used in the `mets/@TYPE` attribute.</assert>
<assert id="CSIP4" role="ERROR" test="(@csip:CONTENTINFORMATIONTYPE_vocabulary_test) and (@csip:CONTENTINFORMATIONTYPE != 'OTHER' or (@csip:CONTENTINFORMATIONTYPE = 'OTHER' and @csip:OTHERCONTENTINFORMATIONTYPE != ''))">Used to declare the Content Information Type Specification used when creating the package. Legal values are defined in a fixed vocabulary. The attribute is mandatory for representation level METS documents.</assert>
<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>
<assert id="CSIP6" role="ERROR" test="@PROFILE">The PROFILE attribute MUST contain the URL of the METS profile that the information package conforms with.</assert>
<assert id="CSIP17" role="WARN" test="mets:dmdSec">Must be used if descriptive metadata about the package content is available. NOTE: According to official METS documentation each metadata section must describe one and only one set of metadata. As such, if implementers want to include multiple occurrences of descriptive metadata into the package this must be done by repeating the whole dmdSec element for each individual metadata.</assert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@
</rule>
<rule context="/mets:mets/mets:amdSec/mets:digiprovMD">
<assert id="CSIP33" role="ERROR" test="@ID">Mandatory, unique id for the digital provenance.</assert>
<assert id="CSIP34" role="WARN" test="@STATUS">Should be used to indicate the status of the package.</assert>
<assert id="CSIP34_1" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP34_2" role="ERROR" test="not(@STATUS) or (@STATUS_vocabulary_test)">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP35" role="WARN" test="mets:mdRef">Should provide a reference to the digital provenance metadata file stored in the “metadata” section of the IP.</assert>
</rule>
<rule context="/mets:mets/mets:amdSec/mets:digiprovMD/mets:mdRef">
<assert id="CSIP36" role="ERROR" test="@LOCTYPE = 'URL'">Mandatory, locator type is always used with the value “URL” from the vocabulary in the attribute.</assert>
<assert id="CSIP37" role="ERROR" test="@xlink:type = 'simple'">Attribute MUST be used with the value “simple”. Value list is maintained by the xlink standard.</assert>
<assert id="CSIP38" role="ERROR" test="@xlink:href">MUST record the actual location of the resource. This specification recommends recording a URL type filepath within this attribute.</assert>
<assert id="CSIP39" role="ERROR" test="@MDTYPE">MUST record the type of metadata at the referenced location.</assert>
<assert id="CSIP40" role="ERROR" test="@MIMETYPE">MUST record the MIME type of the referenced file.</assert>
<assert id="CSIP40" role="ERROR" test="@MIMETYPE_IANA_test">MUST record the MIME type of the referenced file.</assert>
<assert id="CSIP41" role="ERROR" test="@SIZE">MUST record the size in bytes of the referenced file.</assert>
<assert id="CSIP42" role="ERROR" test="@CREATED">MUST record the date and time the referenced file was created.</assert>
<assert id="CSIP43" role="ERROR" test="@CHECKSUM">MUST record the checksum of the referenced file.</assert>
<assert id="CSIP44" role="ERROR" test="@CHECKSUMTYPE">MUST record a value from the METS-standard which identifies the algorithm used to calculate the checksum for the referenced file.</assert>
</rule>
<rule context="/mets:mets/mets:amdSec/mets:rightsMD">
<assert id="CSIP46" role="ERROR" test="@ID">Mandatory, unique id for the rights metadata.</assert>
<assert id="CSIP47" role="WARN" test="@STATUS">Should be used to indicate the status of the package.</assert>
<assert id="CSIP47_1" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP47_2" role="ERROR" test="not(@STATUS) or (@STATUS_vocabulary_test)">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP48" role="WARN" test="mets:mdRef">Should provide a reference to the digital provenance metadata file stored in the “metadata” section of the IP.</assert>
</rule>
<rule context="/mets:mets/mets:amdSec/mets:rightsMD/mets:mdRef">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
<rule context="/mets:mets/mets:dmdSec">
<assert id="CSIP18" role="ERROR" test="@ID">Mandatory, identifier must be unique within the package.</assert>
<assert id="CSIP19" role="ERROR" test="@CREATED">Mandatory, creation date and time of the descriptive metadata in this section.</assert>
<assert id="CSIP20" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP20_1" role="WARN" test="@STATUS">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP20_2" role="ERROR" test="not(@STATUS) or (@STATUS_vocabulary_test)">SHOULD be used to indicated the status of the package.</assert>
<assert id="CSIP21" role="WARN" test="mets:mdRef">SHOULD provide a reference to the descriptive metadata file located in the “metadata” section of the IP..</assert>
</rule>
<rule context="/mets:mets/mets:dmdSec/mets:mdRef">
<assert id="CSIP22" role="ERROR" test="@LOCTYPE = 'URL'">The locator type is always used with the value “URL” from the vocabulary in the attribute.</assert>
<assert id="CSIP23" role="ERROR" test="@xlink:type = 'simple'">Attribute used with the value “simple”. Value list is maintained by the xlink standard.</assert>
<assert id="CSIP24" role="ERROR" test="@xlink:href">The actual location of the resource. This specification recommends recording a URL type filepath in this attribute.</assert>
<assert id="CSIP25" role="ERROR" test="@MDTYPE">Specifies the type of metadata in the referenced file. Values are taken from the list provided by the METS.</assert>
<assert id="CSIP26" role="ERROR" test="@MIMETYPE">MUST hold the IANA mime type of the referenced file.</assert>
<assert id="CSIP26" role="ERROR" test="@MIMETYPE_IANA_test">MUST hold the IANA mime type of the referenced file.</assert>
<assert id="CSIP27" role="ERROR" test="@SIZE">MUST hold the size of the referenced file in bytes.</assert>
<assert id="CSIP28" role="ERROR" test="@CREATED">MUST hold the creation date and time of the referenced file.</assert>
<assert id="CSIP29" role="ERROR" test="@CHECKSUM">MUST hold the checksum of the referenced file.</assert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<rule context="/mets:mets/mets:metsHdr">
<assert id="CSIP7" role="ERROR" test="@CREATEDATE">The metsHdr element MUST have a CREATEDATE attribute.</assert>
<assert id="CSIP8" role="WARN" test="@LASTMODDATE">The metsHdr element SHOULD have a LASTMODDATE attribute.</assert>
<assert id="CSIP9" role="ERROR" test="@csip:OAISPACKAGETYPE">The metsHdr element MUST have a csip:OAISPACKAGETYPE attribute.</assert>
<assert id="CSIP9" role="ERROR" test="@csip:OAISPACKAGETYPE_vocabulary_test">The metsHdr element MUST have a csip:OAISPACKAGETYPE attribute.</assert>
<assert id="CSIP10" role="ERROR" test="mets:agent">The metsHdr element MUST contain an agent element that records the software used to create the package.</assert>
<assert id="CSIP11" role="ERROR" test="count(mets:agent[@ROLE = 'CREATOR']) > 0">The agent element MUST have a ROLE attribute with the value "CREATOR".</assert>
</rule>
<rule context="/mets:mets/mets:metsHdr/mets:agent[@ROLE = 'CREATOR']">
<assert id="CSIP12" role="ERROR" test="@TYPE = 'OTHER'">The agent element MUST have a TYPE attribute with the value "OTHER".</assert>
<assert id="CSIP13" role="ERROR" test="@OTHERTYPE = 'SOFTWARE'">The agent element MUST have a OTHERTYPE attribute with the value "SOFTWARE".</assert>
<assert id="CSIP14" role="ERROR" test="mets:name">The agent element MUST have a child name element that records the name of the software tool used to create the IP.</assert>
<assert id="CSIP15" role="ERROR" test="mets:note">The agent element MUST have a child note element that records the version of the tool used to create the IP.</assert>
<assert id="CSIP14" role="ERROR" test="count(mets:name) = 1 and mets:name != ''">The agent element MUST have a child name element that records the name of the software tool used to create the IP.</assert>
<assert id="CSIP15" role="ERROR" test="count(mets:note) = 1 and mets:note != ''">The agent element MUST have a child note element that records the version of the tool used to create the IP.</assert>
<assert id="CSIP16" role="ERROR" test="mets:note[@csip:NOTETYPE='SOFTWARE VERSION']">The mandatory agent element’s note child has a @csip:NOTETYPE attribute with a fixed value of “SOFTWARE VERSION”.</assert>
</rule>
</pattern>
Expand Down
Loading

0 comments on commit 35604c3

Please sign in to comment.