Native import XML

I’m trying to export and import issues from one OJS instance to another.

The problem is that the exporter OJS is newer (3.3.0.6) and the import OJS is a bit older version (3.2.1.4). I get a lot of errors like this:

Element ‘{http://pkp.sfu.ca}submission_file’, attribute ‘created_at’: The attribute ‘created_at’ is not allowed.

or something like this

Element ‘{http://pkp.sfu.ca}name’: This element is not expected. Expected is ( {http://pkp.sfu.ca}revision ).

Is there anything I can do to migrate from first instance to another? I must point out, it is out of my options to install newer version of OJS on the import side, it is part of the bigger platform and I can not control that part.

thank you

HI @Vedran_Serbu,

The XML import/export changes from one major version to the next, rendering them incompatible. We warn about this here: https://docs.pkp.sfu.ca/admin-guide/en/data-import-and-export#native-xml

The only option you might have is to manually go through the file and make sure it conforms to the 3.3 version of the Native XML - creating a new file from scratch that conforms to the 3.3 version of the XML import/export. Depending on the size of your export, this could be a large job.

-Roger
PKP Team

Is there some straightforward comparative page where I can see which of the attributes of the Native XML is changed / added so I can go through file and change from one form to another, or there is none?

You can try to compare the 3.3.0 XSD schema definitions

with the corresponding stable-3_2_0 stable versions and to write an XSLT that does the backporting. However, you need to knowledgeable of XSLT and XSLT processors such as Saxon.

There is also a commercial mapping tool from Altova, called MapForce, that allows to map two XSD (XML Schema Definition) files and writes an XSLT transformation for you. However, the product runs on MS windows only and is quite expensive.

@rcgillis @asmecher This software would be an option to create XSLTs for upgrading / downgrading NativeXML files for migrations.