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

Erzeuge PREMIS:EVENT für Normalisierung

parent 924f0fd9
No related branches found
No related tags found
No related merge requests found
...@@ -6,13 +6,20 @@ ...@@ -6,13 +6,20 @@
<p:option name="objectId" required="true"/> <p:option name="objectId" required="true"/>
<p:option name="targetUri" required="true"/> <p:option name="targetUri" required="true"/>
<p:uuid name="uuid-source" version="4" match="@create"> <p:group name="uuid-source">
<p:input port="source"> <p:output port="result"/>
<p:inline> <p:identity>
<uuid create=""/> <p:input port="source">
</p:inline> <p:inline>
</p:input> <uuid/>
</p:uuid> </p:inline>
</p:input>
</p:identity>
<p:add-attribute match="uuid" attribute-name="create" attribute-value=""/>
<p:uuid version="4" match="@create"/>
<p:add-attribute match="uuid" attribute-name="normalize" attribute-value=""/>
<p:uuid version="4" match="@normalize"/>
</p:group>
<p:choose> <p:choose>
<p:when test="doc-available(resolve-uri($targetUri))"> <p:when test="doc-available(resolve-uri($targetUri))">
...@@ -42,6 +49,9 @@ ...@@ -42,6 +49,9 @@
<p:with-param name="eventCreateUUID" select="/uuid/@create"> <p:with-param name="eventCreateUUID" select="/uuid/@create">
<p:pipe step="uuid-source" port="result"/> <p:pipe step="uuid-source" port="result"/>
</p:with-param> </p:with-param>
<p:with-param name="eventNormalizeUUID" select="/uuid/@normalize">
<p:pipe step="uuid-source" port="result"/>
</p:with-param>
<p:input port="source"> <p:input port="source">
<p:pipe step="validate-kitodo" port="result"/> <p:pipe step="validate-kitodo" port="result"/>
</p:input> </p:input>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<!-- Normalisiert die von Kitodo.Production erzeugte METS-Datei --> <!-- Normalisiert die von Kitodo.Production erzeugte METS-Datei -->
<xsl:param name="objectId" as="xs:string" required="yes"/> <xsl:param name="objectId" as="xs:string" required="yes"/>
<xsl:param name="eventCreateUUID" as="xs:string" required="yes"/> <xsl:param name="eventCreateUUID" as="xs:string" required="yes"/>
<xsl:param name="eventNormalizeUUID" as="xs:string" required="yes"/>
<xsl:key name="files" match="file" use="@ID"/> <xsl:key name="files" match="file" use="@ID"/>
...@@ -46,6 +47,20 @@ ...@@ -46,6 +47,20 @@
</xmlData> </xmlData>
</mdWrap> </mdWrap>
</digiprovMD> </digiprovMD>
<digiprovMD ID="id.{$eventNormalizeUUID}" 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="$eventNormalizeUUID"/></premis:eventIdentifierValue>
</premis:eventIdentifier>
<premis:eventType valueURI="http://id.loc.gov/vocabulary/preservation/eventType/normalization">normalization</premis:eventType>
<premis:eventDataTime><xsl:value-of select="current-dateTime()"/></premis:eventDataTime>
</premis:event>
</xmlData>
</mdWrap>
</digiprovMD>
</amdSec> </amdSec>
</xsl:template> </xsl:template>
...@@ -58,7 +73,7 @@ ...@@ -58,7 +73,7 @@
</xsl:template> </xsl:template>
<xsl:template match="metsHdr"> <xsl:template match="metsHdr">
<metsHdr CREATEDATE="{@CREATEDATE}" LASTMODDATE="{current-dateTime()}" ADMID="id.{$eventCreateUUID}"> <metsHdr CREATEDATE="{@CREATEDATE}" LASTMODDATE="{current-dateTime()}" ADMID="id.{$eventCreateUUID} id.{$eventNormalizeUUID}">
<agent ROLE="CUSTODIAN" TYPE="ORGANIZATION"> <agent ROLE="CUSTODIAN" TYPE="ORGANIZATION">
<name>Herzog August Bibliothek Wolfenbüttel</name> <name>Herzog August Bibliothek Wolfenbüttel</name>
</agent> </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