diff --git a/src/xproc/publish.xpl b/src/xproc/publish.xpl index 13d3a29f1db788677c4bf1e5024f5c724679fe7a..fa7493856d92d56582c09434abbc4532a88a7e82 100644 --- a/src/xproc/publish.xpl +++ b/src/xproc/publish.xpl @@ -6,13 +6,20 @@ <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:group name="uuid-source"> + <p:output port="result"/> + <p:identity> + <p:input port="source"> + <p:inline> + <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:when test="doc-available(resolve-uri($targetUri))"> @@ -42,6 +49,9 @@ <p:with-param name="eventCreateUUID" select="/uuid/@create"> <p:pipe step="uuid-source" port="result"/> </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:pipe step="validate-kitodo" port="result"/> </p:input> diff --git a/src/xslt/mets.xsl b/src/xslt/mets.xsl index 06f03808e6fb620cf49e66471f88d3aeda108a69..1e0bd5768603c23ace3c5c76f3c5735936f30998 100644 --- a/src/xslt/mets.xsl +++ b/src/xslt/mets.xsl @@ -12,6 +12,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:param name="eventNormalizeUUID" as="xs:string" required="yes"/> <xsl:key name="files" match="file" use="@ID"/> @@ -46,6 +47,20 @@ </xmlData> </mdWrap> </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> </xsl:template> @@ -58,7 +73,7 @@ </xsl:template> <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"> <name>Herzog August Bibliothek Wolfenbüttel</name> </agent>