Closed andre-hohmann closed 4 years ago
If the internal file looks good, it seems to be a problem with xslt, isn't it?
Yes, sorry, it seems to be the XSLT. I did not expect, that this is possible by it. I will have a look on it.
The reason for that behavior was the modification of the export XSLT to enable the use of the process title of the dmdSec in the amdSec.
It does not work, if all variables in the export XSLT are defined globally. To enable the use of variables of the dmdSec in the amdSec (for example process title for dv:presentation
, ...), the specific variable must be defined by absolute XPath.
Generally, the variables in the dmdSec must be defined relatively.
<xsl:template match="mets:amdSec/mets:rightsMD/mets:mdWrap/mets:xmlData/kitodo:kitodo">
<xsl:variable name="rights" select="/mets:mets/mets:dmdSec/mets:mdWrap/mets:xmlData/kitodo:kitodo/kitodo:metadata[@name='LegalNoteAndTermsOfUse']"/>
</xsl:template>
<xsl:template name="dmdSec" match="mets:dmdSec/mets:mdWrap/mets:xmlData/kitodo:kitodo">
<xsl:variable name="rights" select="kitodo:metadata[@name='LegalNoteAndTermsOfUse']"/>
</xsl:template>
Problem
1 If the issue without structure elements is exported, the exported METS-file looks good.
Click to show the exported METS-File:
```xml2 If a structure element is created in the issue, the exported METS-file does not look good. It seems as if the two dmdSecs are combined and duplicated.
Click to show the exported METS-File:
```xml3 The internal METS-file looks good.
Click to show the exported METS-File:
```xml