-
Notifications
You must be signed in to change notification settings - Fork 0
/
mets_root_rules.xml
42 lines (41 loc) · 3.46 KB
/
mets_root_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
<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_root_element_validation">
<title>Validate METS root element.</title>
<rule id="CSIP1" context="/">
<report test="count(mets:mets) > 0">The root level element is required in all METS documents</report>
</rule>
</pattern>
<pattern id="METS_root_element_object_id_validation">
<title>Validate METS root element.</title>
<rule id="CSIP2" context="mets:mets">
<assert test="@OBJID">It is recommended that it be the same as the name or ID of the package (the name of the root folder). The OBJID must meet the CS IP requirement of being unique at least across the repository.</assert>
</rule>
</pattern>
<pattern id="METS_root_element_type_validation">
<rule id="CSIP3" context="/">
<assert test="count(mets:mets[@TYPE]) > 0">General content type attribute does not exist.</assert>
</rule>
<rule id="CSIP4.1" context="/mets:mets">
<assert test="@csip:CONTENTTYPESPECIFICATION">Content information type attribute does not exist.</assert>
</rule>
</pattern>
<pattern id="METS_root_element_value_validation">
<rule id="CSIP4.2" context="/mets:mets">
<assert test="(contains(string(@csip:CONTENTTYPESPECIFICATION), 'SMURFERMS') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SMURFSFSB') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SIARD1') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SIARD2') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SIARDDK') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'GeoVectorGML') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'GeoRasterGeotiff') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'MIXED') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'OTHER'))">Content information type attribute value is not known. Known values are: SMURFERMS, SMURFSFSB, SIARD1, SIARD2, SIARDDK, GeoVectorGML, GeoRasterGeotiff, MIXED, OTHER.</assert>
</rule>
</pattern>
<pattern id="METS_root_element_other_type_validation">
<rule id="CSIP5" context="/mets:mets">
<assert test="(contains(string(@csip:CONTENTTYPESPECIFICATION), 'SMURFERMS') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SMURFSFSB') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SIARD1') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SIARD2') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'SIARDDK') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'GeoVectorGML') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'GeoRasterGeotiff') or contains(string(@csip:CONTENTTYPESPECIFICATION), 'MIXED') or (contains(string(@csip:CONTENTTYPESPECIFICATION), 'OTHER' and @csip:OTHERCONTENTTYPESPECIFICATION)))">If the value of a CONTENTTYPESPECIFICATION attribute is "OTHER", then the OTHERCONTENTTYPESPECIFICATION attribute must be used</assert>
</rule>
</pattern>
<pattern id="METS_root_element_profile_validation">
<rule id="CSIP6" context="/mets:mets">
<assert test="contains(string(@PROFILE), 'http://')">The PROFILE attribute has to have as its value the URL of the used profile.</assert>
</rule>
</pattern>
</schema>