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

User-Agent für Normalisierung angeben

parent 3fef9c88
No related branches found
No related tags found
No related merge requests found
<p:declare-step version="1.0" name="main" <p:declare-step version="1.0" name="main"
xmlns:d="http://dmaus.name/ns/xproc"
xmlns:p="http://www.w3.org/ns/xproc"> xmlns:p="http://www.w3.org/ns/xproc">
<p:input port="source" primary="true" sequence="false"/> <p:input port="source" primary="true" sequence="false"/>
...@@ -6,7 +7,20 @@ ...@@ -6,7 +7,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:group name="uuid-source"> <p:declare-step type="d:uuid-event">
<p:input port="source"/>
<p:output port="result"/>
<p:option name="event" required="true"/>
<p:add-attribute attribute-value="" match="uuid">
<p:with-option name="attribute-name" select="$event"/>
</p:add-attribute>
<p:uuid version="4">
<p:with-option name="match" select="concat('@', $event)"/>
</p:uuid>
</p:declare-step>
<p:declare-step type="d:uuid-source">
<p:output port="result"/> <p:output port="result"/>
<p:identity> <p:identity>
<p:input port="source"> <p:input port="source">
...@@ -15,11 +29,11 @@ ...@@ -15,11 +29,11 @@
</p:inline> </p:inline>
</p:input> </p:input>
</p:identity> </p:identity>
<p:add-attribute match="uuid" attribute-name="create" attribute-value=""/> <d:uuid-event event="create"/>
<p:uuid version="4" match="@create"/> <d:uuid-event event="normalize"/>
<p:add-attribute match="uuid" attribute-name="normalize" attribute-value=""/> </p:declare-step>
<p:uuid version="4" match="@normalize"/>
</p:group> <d:uuid-source name="uuid-source"/>
<p:choose> <p:choose>
<p:when test="doc-available(resolve-uri($targetUri))"> <p:when test="doc-available(resolve-uri($targetUri))">
...@@ -52,6 +66,7 @@ ...@@ -52,6 +66,7 @@
<p:with-param name="eventNormalizeUUID" select="/uuid/@normalize"> <p:with-param name="eventNormalizeUUID" select="/uuid/@normalize">
<p:pipe step="uuid-source" port="result"/> <p:pipe step="uuid-source" port="result"/>
</p:with-param> </p:with-param>
<p:with-param name="eventNormalizeAgent" select="concat(p:system-property('p:product-name'), ' ', p:system-property('p:product-version'))"/>
<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>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<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:param name="eventNormalizeUUID" as="xs:string" required="yes"/>
<xsl:param name="eventNormalizeAgent" as="xs:string" required="yes"/>
<xsl:key name="files" match="file" use="@ID"/> <xsl:key name="files" match="file" use="@ID"/>
...@@ -57,6 +58,12 @@ ...@@ -57,6 +58,12 @@
</premis:eventIdentifier> </premis:eventIdentifier>
<premis:eventType valueURI="http://id.loc.gov/vocabulary/preservation/eventType/normalization">normalization</premis:eventType> <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:eventDataTime><xsl:value-of select="current-dateTime()"/></premis:eventDataTime>
<premis:linkingAgentIdentifier>
<premis:linkingAgentIdentifierType>Name</premis:linkingAgentIdentifierType>
<premis:linkingAgentIdentifierValue><xsl:value-of select="$eventNormalizeAgent"/></premis:linkingAgentIdentifierValue>
<premis:linkingAgentRole valueURI="http://id.loc.gov/vocabulary/preservation/eventRelatedAgentRole/exe">executing program</premis:linkingAgentRole>
</premis:linkingAgentIdentifier>
</premis:event> </premis:event>
</xmlData> </xmlData>
</mdWrap> </mdWrap>
......
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