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
64 stars 63 forks source link

Release 3.4 - new entry in kitodo_opac.xlm "prestructured" #4847

Closed stefanCCS closed 2 years ago

stefanCCS commented 2 years ago

I have found in Release 3.4 the following new config lines in kitodo_opax.xml:

 <!-- Use the following element to activate prestructured import, e.g. delegate creating the METS structure to configured XSLT mapping file -->
 <!-- <prestructured>true</prestructured> -->

--> Please explain the purpose/function.

solth commented 2 years ago

This option allows importing metadata that already contains structural information from search interfaces.

When using the flag prestructured, the user is responsible for providing a corresponding XSLT import mapping that not only maps the metadata to kitodo:metadata entries, but that also creates the whole surrounding METS structure (including structure maps).

See https://github.com/kitodo/kitodo-production/pull/4699 for further details.

stefanCCS commented 2 years ago

Ok, general idea understood (and I like it 👍 ). What is still not clear for me:

solth commented 2 years ago

The file can be found under Kitodo/src/main/resources/xslt/mods2dfgviewer_prestructured.xsl in the repository. I do not know if it was officially bundled with the 3.4 release.

This single file is sufficient to create a complete METS/Kitodo file in the internal format, but if you wish you can of course split the process of creating the structure and the metadata sections into multiple XSLT mappings, because Kitodo supports applying multiple mapping file in sequence during XML import.

stefanCCS commented 2 years ago

Ok, many thanks. File mods2dfgviewer_prestructured.xsl found in Repo (but not in official release) --> @Kathrin-Huber maybe something to add in next release.

@solth : If I look at this file, I can see a "simple" coyping of "structMap":

    <!-- ### METS structMaps -->
    <xsl:template match="mets:structMap">
        <mets:structMap>
            <xsl:copy-of select="@*"/>
            <xsl:copy-of select="node()"/>
        </mets:structMap>
    </xsl:template>

I can understand, that the XSLT processing will fill the initial meta.xml with kitodo:kitodo entries for the MODS information and the structMap information as they are (for both physical and logical structMap). What I do still not understand, what happens in Kitodo-SW if I provide this "prestructured"-flag? (or the other way around, what happens in Kitodo-SW, if I do NOT provide this "prestructured"-flag, but do this XSLT-Processing which includes structMap?

solth commented 2 years ago

I have to admit I do not know what "Kitodo-SW" is, but if you combine <prestructured>false</prestructred> in kitodo_opac.xml (or do not add such an element to your configuration to begin with) with an XSLT mapping that does indeed create the whole METS structure, the import will fail.

The same is true for the other way round: if you configure one opac import as "prestructured" but than provide a mapping file that only creates the kitodo:metadata nodes (but not the surrounding METS structure), the import will fail likewise.

stefanCCS commented 2 years ago

Ok, many thanks - understood. The Kitodo.Production-Software ("Kitodo-SW", sorry for this abbreviation) takes this <prestructure>-parameter and somehow uses this for creating structure information (or not, if it is "false"). Next question I have: If I have some structure, which I want to import (lets assume, logical strucuture, like "chapters"), are these structure elements visible in the UI (I assume not)? Do you have an example of a PPN in K10plus, for which you can get a structure (so, that I can try it out by myself)?

solth commented 2 years ago

Next question I have: If I have some structure, which I want to import (lets assume, logical strucuture, like "chapters"), are these structure elements visible in the UI (I assume not)?

If you mean "visible during the import process" than no, the imported structures are not visible. But that is only because the import mask does not display structure elements (yet?). They are, however, visible like all other structure elements if you open the process in the metadata editor afterwards.

Do you have an example of a PPN in K10plus, for which you can get a structure (so, that I can try it out by myself)?

This feature was specifically implemented for one very specific small data source that is only used by one library. All records imported from that source have existing structural elements. I think that will be true for most catalogs/search interfaces: the returned records are either all already structured or none of them is. So I can't provide you with a PPN in K10+ with which you could test this feature, simply because I don't think K10+ returns any such records when querying the normal SRU interface.

stefanCCS commented 2 years ago

Ok, understood. And, many thanks for providing these answers. I will close this issue now.