-
Notifications
You must be signed in to change notification settings - Fork 0
/
mets_hdr_rules.xml
68 lines (67 loc) · 5.31 KB
/
mets_hdr_rules.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<schema xmlns="http://purl.oclc.org/dsdl/schematron">
<ns prefix="csip" uri="https://dilcis.eu/XML/METS/CSIPExtensionMETS"/>
<ns prefix="ead" uri="urn:isbn:1-931666-22-9"/>
<ns prefix="mets" uri="http://www.loc.gov/METS/"/>
<ns prefix="xlink" uri="http://www.w3.org/1999/xlink"/>
<pattern id="METS_header_element_validation">
<title>Validate METS header element metsHdr.</title>
<rule id="CSIP7" context="mets:metsHdr">
<assert test="name()='mets:metsHdr'">Element for describing the package itself.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_package_creation_date_validation">
<rule id="CSIP9" context="mets:metsHdr">
<assert test="@CREATEDATE">Mandatory, the date of creation of the package.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_package_last_modification_date_validation">
<rule id="CSIP10" context="mets:metsHdr">
<assert test="@LASTMODDATE">Mandatory if relevant (in case the package has been modified).</assert>
</rule>
</pattern>
<pattern id="METS_header_element_csip_type_validation">
<rule id="CSIP11.1" context="mets:metsHdr">
<assert test="@csip:OAISPACKAGETYPE">An attribute added by the CS IP for describing the type of the IP.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_csip_type_value_validation">
<rule id="CSIP11.2" context="mets:metsHdr">
<assert test="(contains(string(@csip:OAISPACKAGETYPE), 'SIP') or contains(string(@csip:OAISPACKAGETYPE), 'AIP') or contains(string(@csip:OAISPACKAGETYPE), 'DIP') or contains(string(@csip:OAISPACKAGETYPE), 'AIU') or contains(string(@csip:OAISPACKAGETYPE), 'AIC'))">An attribute added by the CS IP for describing the type of the IP. The vocabulary to be used contains values: SIP, AIP, DIP, AIU, AIC. The vocabulary is managed by the DILCIS Board and will be updated when required.</assert>
</rule>
</pattern>
<pattern id="METS_header_agent_validation">
<rule id="CSIP12" context="mets:agent">
<assert test="name()='mets:agent'">The metsHdr must include at least one agent describing the software which has been used to create the package (ROLE=”CREATOR” TYPE=”OTHER” OTHERTYPE=”SOFTWARE”). The use of this element for describing additional agents is optional and nor restricted or recommended by this specification.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_agent_role_validation">
<rule id="CSIP13" context="mets:agent">
<assert test="(@ROLE and contains(string(@ROLE), 'CREATOR'))">The role of the agent. The CS IP requires describing at least one agent with the agent/@ROLE value “CREATOR”. For other (optional) occurrences of agent this attribute shall use a value from the fixed list provided by METS.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_agent_type_value_validation">
<rule id="CSIP15" context="mets:agent">
<assert test="@TYPE and (contains(string(@TYPE), 'INDIVIDUAL') or contains(string(@TYPE), 'ORGANISATION') or contains(string(@TYPE), 'OTHER'))">The CS IP requires that at least one instance of the agent element includes the agent/@TYPE attribute with the value “OTHER”. In other occurrences of the agent element the attribute is optional. If used, values defined in official METS documentation shall be followed (“individual”, “organisation”, “other”).</assert>
</rule>
</pattern>
<pattern id="METS_header_element_agent_other_type_validation">
<rule id="CSIP16" context="mets:agent">
<assert test="@TYPE and @OTHERTYPE and (contains(string(@TYPE), 'OTHER') and contains(string(@OTHERTYPE), 'SOFTWARE'))">The CS IP requires that at least one instance of the agent element includes the agent/@OTHERTYPE attribute with the value “SOFTWARE”. In other occurrences this attribute shall only be used in case the value of agent/@TYPE is “OTHER”.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_agent_name_validation">
<rule id="CSIP17" context="mets:name">
<assert test="contains(string(@OTHERTYPE), 'SOFTWARE') and name()='mets:name'">The name of the agent. If the value of the @OTHERTYPE attribute is “SOFTWARE” this element must provide the name of the software tool which was used to create the IP.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_agent_note_validation">
<rule id="CSIP18" context="mets:note">
<assert test="contains(string(@OTHERTYPE), 'SOFTWARE') and name()='mets:note'">Additional information about the agent. If the value of the @OTHERTYPE attribute is “SOFTWARE” this element MUST provide the version information for the tool which was used to create the IP.</assert>
</rule>
</pattern>
<pattern id="METS_header_element_agent_note_type_validation">
<rule id="CSIP19" context="mets:note">
<assert test="contains(string(@OTHERTYPE), 'SOFTWARE') and (@csip:TYPE and contains(string(@csip:TYPE), 'SOFTWARE VERSION'))">Type attribute for the note element. If the value of the @OTHERTYPE attribute is “SOFTWARE” this attribute must be used with the fixed value “SOFTWARE VERSION”</assert>
</rule>
</pattern>
</schema>