Skip to content

Instantly share code, notes, and snippets.

@bitsgalore
Last active February 2, 2018 17:21
Show Gist options
  • Save bitsgalore/cd903a2479404629346daa955fca112f to your computer and use it in GitHub Desktop.
Save bitsgalore/cd903a2479404629346daa955fca112f to your computer and use it in GitHub Desktop.
Minimal METS example that shows how to link mets:div element to both digiprovMD and sourceMD elements
<mets:mets xmlns:mets="http://www.loc.gov/METS/" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:premis="http://www.loc.gov/premis/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/mets.xsd http://www.loc.gov/mods/v3 https://www.loc.gov/standards/mods/v3/mods-3-4.xsd http://www.loc.gov/premis/v3 https://www.loc.gov/standards/premis/premis.xsd">
<mets:dmdSec ID="dmdSec_1">
<mets:mdWrap MDTYPE="MODS" MDTYPEVERSION="3.4">
<mets:xmlData>
<mods:mods>
<mods:titleInfo>
<mods:title>My Enhanced CD</mods:title>
</mods:titleInfo>
<mods:name>
<mods:namePart>Snot, Piet</mods:namePart>
</mods:name>
</mods:mods>
</mets:xmlData>
</mets:mdWrap>
</mets:dmdSec>
<mets:amdSec ID="amdSec_1">
<mets:techMD ID="techMD_1">
<mets:mdWrap MIMETYPE="text/xml" MDTYPE="PREMIS:OBJECT" MDTYPEVERSION="3.0">
<mets:xmlData>
</mets:xmlData>
</mets:mdWrap>
</mets:techMD>
<mets:techMD ID="techMD_2">
<mets:mdWrap MIMETYPE="text/xml" MDTYPE="PREMIS:OBJECT" MDTYPEVERSION="3.0">
<mets:xmlData>
</mets:xmlData>
</mets:mdWrap>
</mets:techMD>
<mets:sourceMD ID="sourceMD_1">
</mets:sourceMD>
<mets:digiprovMD ID="digiprovMD_1">
<mets:mdWrap MIMETYPE="text/xml" MDTYPE="PREMIS:EVENT" MDTYPEVERSION="3.0">
<mets:xmlData>
</mets:xmlData>
</mets:mdWrap>
</mets:digiprovMD>
</mets:amdSec>
<mets:fileSec>
<mets:fileGrp>
<mets:file ID="file_1" SIZE="4102411" MIMETYPE="audio/flac" CHECKSUM="6bc4f0a53e9d866b751beff5d465f5b86a8a160d388032c079527a9cb7cabef430617f156abec03ff5a6897474ac2d31c573845d1bb99e2d02ca951da8eb2d01" CHECKSUMTYPE="SHA-512" ADMID="techMD_1">
<mets:FLocat LOCTYPE="URL" xlink:href="file:///cd-rom/1/01.flac"/>
</mets:file>
<mets:file ID="file_2" SIZE="31764480" MIMETYPE="application/x-iso9660-image" CHECKSUM="783ae6ac53eba33b8ab04363e1159a71a38d2db2f8004716a1dc6c4e11581b4311145f07834181cd7ec77cd7199377286ceb5c3506f0630939112ae1d55e3d47" CHECKSUMTYPE="SHA-512" ADMID="techMD_2">
<mets:FLocat LOCTYPE="URL" xlink:href="file:///cd-rom/1/ELL2.iso"/>
</mets:file>
</mets:fileGrp>
</mets:fileSec>
<mets:structMap>
<mets:div TYPE="physical" LABEL="volumes" DMDID="dmdSec_1">
<mets:div TYPE="cd-rom" ORDER="1" ADMID="digiprovMD_1 sourceMD_1">
<mets:div TYPE="audio track" ORDER="1">
<mets:fptr FILEID="file_1"/>
</mets:div>
<mets:div TYPE="disk image" ORDER="2">
<mets:fptr FILEID="file_2"/>
</mets:div>
</mets:div>
</mets:div>
</mets:structMap>
</mets:mets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment