XML Import: Attaching PDF ("production ready" file) to publication format does not work?

Hi everyone!

We are currently trying to programmatically create monograph datasets for OMP (including embedded PDF data) using the XML import plugin. So far the result looks like this in OMPs interface:

The one thing still missing, is adding the production ready file to the publication format and setting it as “approved” and “open access” terms. I am struggling to get this working and was wondering if I am missing something. The imported XML looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<monograph xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:onix="http://ns.editeur.org/onix/3.0/reference" stage="production"
           date_published="2020-04-07" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
    <id type="internal" advice="ignore">1</id>
    <title>Test title</title>
    <prefix></prefix>
    <subtitle></subtitle>
    <abstract>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</abstract>
    <authors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <author primary_contact="true" include_in_browse="true" user_group_ref="Author">
            <givenname>Max</givenname>
            <familyname>Mustermann</familyname>
            <email>Test</email>
        </author>
    </authors>
    <submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     stage="production_ready" id="1" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <revision number="1" genre="Book Manuscript" filename="merged.pdf"
                  viewable="true"
                  date_uploaded="2020-04-08"
                  date_modified="2020-04-08"
                  filesize="202287"
                  filetype="application/pdf">
            <name>Cilantro creation</name>
            <embed encoding="base64">(...)</embed>
        </revision>
    </submission_file>
    <publication_format xmlns:onix="http://ns.editeur.org/onix/3.0/reference"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" approved="true" available="true"
                        physical_format="false" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
        <name>PDF</name>
        <seq>1</seq>
        <submission_file_ref id="1" revision="1"/>
    </publication_format>
</monograph>

I initially thought the submission_file_ref would do the trick (at least for linking the file, if not setting the approval etc.).

Cheers
Simon

Hi @dersmon,

What version of OMP is this? (Please include this in your posts.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @dersmon,

I have tried the same with the OMP 3.1.2.2 and it worked with some manual steps required afterwards. The PDF has been imported into OMP, with linking submission file and publication format as you have, but I was not able to approve the PDF automatically, that was a manual step (approved and available).

Regards, Primož

Hi @asmecher, we are currently on 3.1.0.0.

Hi @dersmon,

As a start, I’d suggest upgrading to a newer OMP release. 3.1.0.0 is quite old and likely is a little behind in the import/export code. You have several upgrade options:

  • Newest 3.1.1-x: Likely 100% compatible with the import XML you’re already using.
  • Newest 3.1.2-x: Will require some minor adaptations to the import XML, as names (people, authors) are now multilingual-capable.
  • Newest 3.2.0-x: Will require the names adaptation, plus some adaptation to accommodate the new versioning toolset

One way to identify whether the import/export tools are missing something, or whether your own XML is missing something, would be to manually enter a few submissions to your satisfaction and try exporting and re-importing that XML. If the XML loses some data along the way, perhaps you’ve identified a gap in the import/export toolset.

Regards,
Alec Smecher
Public Knowledge Project Team