kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
63 stars 62 forks source link

dmdSec of newspaper issues are mixed up when structure elements are created #3898

Closed andre-hohmann closed 4 years ago

andre-hohmann commented 4 years ago

Problem

1 If the issue without structure elements is exported, the exported METS-file looks good.

Click to show the exported METS-File: ```xml 1667 Public Domain Mark 1.0 Open Access Latf ger oai:de:slub-dresden:db:id-1667232932-1872012901 oai:de:slub-dresden:db:id-1667232932 http://digital.slub-dresden.de/id1667232932-1872012901 urn:nbn:de:bsz:14-db-id1667232932-1872012901 Saxonica Sächsische Landesbibliothek - Staats- und Universitätsbibliothek Dresden http://digital.slub-dresden.de/fileadmin/images/dfgviewer_logo_slub.gif http://www.slub-dresden.de/ mailto:digital@slub-dresden.de pdm https://digital.slub-dresden.de/id1667232932-1872012901 http://dienste.slub-dresden.de/cgi-bin/FOZK.pl?PPN=1667232932 ```

2 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: ```xml 1667 Artikel 1 Public Domain Mark 1.0 Open Access Latf ger oai:de:slub-dresden:db:id-1667232932-1872012901 oai:de:slub-dresden:db:id-1667232932 http://digital.slub-dresden.de/id1667232932-1872012901 urn:nbn:de:bsz:14-db-id1667232932-1872012901 Saxonica Artikel 1 Public Domain Mark 1.0 Open Access Latf ger oai:de:slub-dresden:db:id-1667232932-1872012901 oai:de:slub-dresden:db:id-1667232932 http://digital.slub-dresden.de/id1667232932-1872012901 urn:nbn:de:bsz:14-db-id1667232932-1872012901 Saxonica Sächsische Landesbibliothek - Staats- und Universitätsbibliothek Dresden http://digital.slub-dresden.de/fileadmin/images/dfgviewer_logo_slub.gif http://www.slub-dresden.de/ mailto:digital@slub-dresden.de pdm https://digital.slub-dresden.de/id1667232932-1872012901 http://dienste.slub-dresden.de/cgi-bin/FOZK.pl?PPN=1667232932 ```

3 The internal METS-file looks good.

Click to show the exported METS-File: ```xml 1667 AnzefRiS_1667232932-1872012901_01-f Fraktur ger Saxonica PDM1.0 Artikel 1
Kathrin-Huber commented 4 years ago

If the internal file looks good, it seems to be a problem with xslt, isn't it?

andre-hohmann commented 4 years ago

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.

andre-hohmann commented 4 years ago

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>