Closed andre-hohmann closed 4 years ago
You would have to set these attributes with the XSLT. Just like the conversion from <kitodo:metadata>
to <mods:*>
also the announcement that it is MDTYPE="MODS"
(or something else).
It seems possible with the following transformations. I will remove the label "blocking" from this issue.
However, it must be determined and communicated, which elements are created by Kitodo.Production and which elements have to be transformed by XSLT. Now it is not consistent and could lead to irritations by the users, when they expect completely correct METS-files without XSLT adjustments. Therefore, i will add the label "question" and "documentation". @Kathrin-Huber
See comment https://github.com/kitodo/kitodo-production/issues/3544#issuecomment-655691672 for a probably better solution
See comment https://github.com/kitodo/kitodo-production/issues/3544#issuecomment-655691672 for a probably better solution.
It seems that the following configuration works better:
I have checked it out with the files attached, and with a software version 3.2-build 19.06.2020.
Unfortunately, it has not worked.
My impression is, that the kitodo software only processes the part which is
If you add xmlns:mets="http://www.loc.gov/METS/"
in the stylesheet version, it should work:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:kitodo="http://meta.kitodo.org/v1/"
xmlns:mets="http://www.loc.gov/METS/"
>
Many thanks, work fine! (for all 3 mentioned data in 'dmdsec, 2xamdsec)
Addtionally, similar issue needs to be solved for the entry
<mets:structMap TYPE="PHYSICAL">
<mets:div ID="uuid-57fedc25-61bc-479a-8ea3-18445cc2e767" TYPE="physSequence">
The TYPE="physSequence" also is not written automatically. I have created another template in the xslt with the same logic:
<xsl:template match="mets:structMap/mets:div/mets:div">
<xsl:attribute name="TYPE">
<xsl:value-of select="'physSequence'"/>
</xsl:attribute>
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
Problem is, that this 'match' matches to both
With the help of Google and a bit of playing around, it looks like, I have found a solution:
<xsl:template match="mets:structMap[@TYPE='PHYSICAL']/mets:div/mets:div">
<xsl:attribute name="TYPE">
<xsl:value-of select="'physSequence'"/>
</xsl:attribute>
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
Anyway, I would be glad if you check this, please.
Thanks for hint regarding mets:structMap[@TYPE='PHYSICAL']
. This is really important.
Your suggestion did not work for me, but it let me think about it again and i might have found another way. Thus, probably this is a better solution for all METS-sections:
<xsl:template match="mets:dmdSec/mets:mdWrap">
<xsl:copy>
<xsl:attribute name="MDTYPE">MODS</xsl:attribute>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="mets:amdSec/mets:rightsMD/mets:mdWrap">
<xsl:copy>
<xsl:attribute name="MDTYPE">OTHER</xsl:attribute>
<xsl:attribute name="MIMETYPE">text/xml</xsl:attribute>
<xsl:attribute name="OTHERMDTYPE">DVRIGHTS</xsl:attribute>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="mets:amdSec/mets:digiprovMD/mets:mdWrap">
<xsl:copy>
<xsl:attribute name="MDTYPE">OTHER</xsl:attribute>
<xsl:attribute name="MIMETYPE">text/xml</xsl:attribute>
<xsl:attribute name="OTHERMDTYPE">DVLINKS</xsl:attribute>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="mets:structMap[@TYPE='PHYSICAL']/mets:div">
<xsl:copy>
<xsl:attribute name="TYPE">physSequence</xsl:attribute>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
Very nice! Works fine, and is much better than the solution before. Many thanks. I would propose to add the "documentation" label.
Problem
in the
<mdWrap>
-elements, the METS-attributes are missing.Solution
The following attributes must be applied to the
<mdWrap>
-elements:<dmdSec">
:<mdWrap>
-><mdWrap MDTYPE="MODS">
<amdSec">
/<rightsMD>
:<mdWrap>
-><mdWrap MDTYPE="OTHER" MIMETYPE="text/xml" OTHERMDTYPE="DVRIGHTS" >
<amdSec">
/<digiprovMD>
:<mdWrap>
-><mdWrap MDTYPE="OTHER" MIMETYPE="text/xml" OTHERMDTYPE="DVLINKS" >
Examples
Examples of the current state: