-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use local XML schemas for XML validation
- Loading branch information
Showing
13 changed files
with
3,449 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
import os | ||
import pathlib | ||
|
||
|
||
THIS_DIR = os.path.dirname(__file__) | ||
|
||
ASSETS_DIR = os.path.join(THIS_DIR, "assets", "") | ||
|
||
# Use local XML schemas for validation. | ||
os.environ["XML_CATALOG_FILES"] = str( | ||
pathlib.Path(__file__).parent / "assets/catalog/catalog.xml" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> | ||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
|
||
<group prefer="system"> | ||
<system | ||
systemId="http://www.loc.gov/standards/xlink/xlink.xsd" | ||
uri="../mets/xlink.xsd" /> | ||
|
||
<system | ||
systemId="http://www.loc.gov/standards/mets/version1121/mets.xsd" | ||
uri="../mets/mets.xsd" /> | ||
|
||
<system | ||
systemId="http://www.loc.gov/standards/premis/v3/premis.xsd" | ||
uri="../premis/premis.xsd" /> | ||
|
||
<!-- mets-reader-writer still validates against PREMIS 2.2 --> | ||
<system | ||
systemId="http://www.loc.gov/standards/premis/v2/premis-v2-2.xsd" | ||
uri="../premis/premis-v2-2.xsd" /> | ||
|
||
<system | ||
systemId="http://www.loc.gov/mods/xml.xsd" | ||
uri="../mods/xml.xsd" /> | ||
|
||
<system | ||
systemId="http://www.loc.gov/standards/mods/v3/mods.xsd" | ||
uri="../mods/mods.xsd" /> | ||
|
||
</group> | ||
|
||
</catalog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- METS XLink Schema, v. 2, Nov. 15, 2004 --> | ||
<schema targetNamespace="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified"> | ||
<!-- global attributes --> | ||
<attribute name="href" type="anyURI"/> | ||
<attribute name="role" type="string"/> | ||
<attribute name="arcrole" type="string"/> | ||
<attribute name="title" type="string" /> | ||
<attribute name="show"> | ||
<simpleType> | ||
<restriction base="string"> | ||
<enumeration value="new" /> | ||
<enumeration value="replace" /> | ||
<enumeration value="embed" /> | ||
<enumeration value="other" /> | ||
<enumeration value="none" /> | ||
</restriction> | ||
</simpleType> | ||
</attribute> | ||
<attribute name="actuate"> | ||
<simpleType> | ||
<restriction base="string"> | ||
<enumeration value="onLoad" /> | ||
<enumeration value="onRequest" /> | ||
<enumeration value="other" /> | ||
<enumeration value="none" /> | ||
</restriction> | ||
</simpleType> | ||
</attribute> | ||
<attribute name="label" type="string" /> | ||
<attribute name="from" type="string" /> | ||
<attribute name="to" type="string" /> | ||
<attributeGroup name="simpleLink"> | ||
<attribute name="type" type="string" fixed="simple" form="qualified" /> | ||
<attribute ref="xlink:href" use="optional" /> | ||
<attribute ref="xlink:role" use="optional" /> | ||
<attribute ref="xlink:arcrole" use="optional" /> | ||
<attribute ref="xlink:title" use="optional" /> | ||
<attribute ref="xlink:show" use="optional" /> | ||
<attribute ref="xlink:actuate" use="optional" /> | ||
</attributeGroup> | ||
<attributeGroup name="extendedLink"> | ||
<attribute name="type" type="string" fixed="extended" form="qualified" /> | ||
<attribute ref="xlink:role" use="optional" /> | ||
<attribute ref="xlink:title" use="optional" /> | ||
</attributeGroup> | ||
<attributeGroup name="locatorLink"> | ||
<attribute name="type" type="string" fixed="locator" form="qualified" /> | ||
<attribute ref="xlink:href" use="required" /> | ||
<attribute ref="xlink:role" use="optional" /> | ||
<attribute ref="xlink:title" use="optional" /> | ||
<attribute ref="xlink:label" use="optional" /> | ||
</attributeGroup> | ||
<attributeGroup name="arcLink"> | ||
<attribute name="type" type="string" fixed="arc" form="qualified" /> | ||
<attribute ref="xlink:arcrole" use="optional" /> | ||
<attribute ref="xlink:title" use="optional" /> | ||
<attribute ref="xlink:show" use="optional" /> | ||
<attribute ref="xlink:actuate" use="optional" /> | ||
<attribute ref="xlink:from" use="optional" /> | ||
<attribute ref="xlink:to" use="optional" /> | ||
</attributeGroup> | ||
<attributeGroup name="resourceLink"> | ||
<attribute name="type" type="string" fixed="resource" form="qualified" /> | ||
<attribute ref="xlink:role" use="optional" /> | ||
<attribute ref="xlink:title" use="optional" /> | ||
<attribute ref="xlink:label" use="optional" /> | ||
</attributeGroup> | ||
<attributeGroup name="titleLink"> | ||
<attribute name="type" type="string" fixed="title" form="qualified" /> | ||
</attributeGroup> | ||
<attributeGroup name="emptyLink"> | ||
<attribute name="type" type="string" fixed="none" form="qualified" /> | ||
</attributeGroup> | ||
</schema> |
Oops, something went wrong.