Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kitodo-diglib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dmj
kitodo-diglib
Commits
fb2731ff
Commit
fb2731ff
authored
7 years ago
by
David Maus
Browse files
Options
Downloads
Patches
Plain Diff
User-Agent für Normalisierung angeben
parent
3fef9c88
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xproc/publish.xpl
+21
-6
21 additions, 6 deletions
src/xproc/publish.xpl
src/xslt/mets.xsl
+7
-0
7 additions, 0 deletions
src/xslt/mets.xsl
with
28 additions
and
6 deletions
src/xproc/publish.xpl
+
21
−
6
View file @
fb2731ff
<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="@creat
e"/>
<
d
:uuid
-event event="normaliz
e"/>
<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>
...
...
This diff is collapsed.
Click to expand it.
src/xslt/mets.xsl
+
7
−
0
View file @
fb2731ff
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment