Skip to content
Snippets Groups Projects
Commit 924f0fd9 authored by David Maus's avatar David Maus
Browse files

Erzeuge PREMIS:EVENT für Dokumenterstellung

parent 94f4d662
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,14 @@
<p:option name="objectId" required="true"/>
<p:option name="targetUri" required="true"/>
<p:uuid name="uuid-source" version="4" match="@create">
<p:input port="source">
<p:inline>
<uuid create=""/>
</p:inline>
</p:input>
</p:uuid>
<p:choose>
<p:when test="doc-available(resolve-uri($targetUri))">
<p:error code="TargetFileExists">
......@@ -31,6 +39,9 @@
<p:xslt name="normalize">
<p:with-param name="objectId" select="$objectId"/>
<p:with-param name="eventCreateUUID" select="/uuid/@create">
<p:pipe step="uuid-source" port="result"/>
</p:with-param>
<p:input port="source">
<p:pipe step="validate-kitodo" port="result"/>
</p:input>
......
......@@ -11,6 +11,7 @@
<!-- Normalisiert die von Kitodo.Production erzeugte METS-Datei -->
<xsl:param name="objectId" as="xs:string" required="yes"/>
<xsl:param name="eventCreateUUID" as="xs:string" required="yes"/>
<xsl:key name="files" match="file" use="@ID"/>
......@@ -24,7 +25,29 @@
</mets>
</xsl:template>
<xsl:template match="amdSec"/>
<xsl:template match="amdSec">
<amdSec>
<digiprovMD ID="id.{$eventCreateUUID}" CREATED="{current-dateTime()}">
<mdWrap MDTYPE="PREMIS:EVENT">
<xmlData>
<premis:event xmlns:premis="http://www.loc.gov/premis/v3">
<premis:eventIdentifier>
<premis:eventIdentifierType>UUID</premis:eventIdentifierType>
<premis:eventIdentifierValue><xsl:value-of select="$eventCreateUUID"/></premis:eventIdentifierValue>
</premis:eventIdentifier>
<premis:eventType valueURI="http://id.loc.gov/vocabulary/preservation/eventType/creation">creation</premis:eventType>
<premis:eventDataTime><xsl:value-of select="/mets/metsHdr/@CREATEDATE"/></premis:eventDataTime>
<premis:linkingAgentIdentifier>
<premis:linkingAgentIdentifierType>Name</premis:linkingAgentIdentifierType>
<premis:linkingAgentIdentifierValue><xsl:value-of select="/mets/metsHdr/agent/name"/></premis:linkingAgentIdentifierValue>
<premis:linkingAgentRole valueURI="http://id.loc.gov/vocabulary/preservation/eventRelatedAgentRole/exe">executing program</premis:linkingAgentRole>
</premis:linkingAgentIdentifier>
</premis:event>
</xmlData>
</mdWrap>
</digiprovMD>
</amdSec>
</xsl:template>
<xsl:template match="@ADMID"/>
......@@ -35,7 +58,7 @@
</xsl:template>
<xsl:template match="metsHdr">
<metsHdr CREATEDATE="{@CREATEDATE}" LASTMODDATE="{current-dateTime()}">
<metsHdr CREATEDATE="{@CREATEDATE}" LASTMODDATE="{current-dateTime()}" ADMID="id.{$eventCreateUUID}">
<agent ROLE="CUSTODIAN" TYPE="ORGANIZATION">
<name>Herzog August Bibliothek Wolfenbüttel</name>
</agent>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment