[OJS 3.2] importexport plugins xsd

I think there is an incorrect element reference in pkp-native.xsd.

We are using the native XML importexport plugins to migrate data into the recent OJS 3.2 (3.2.0-0 ?). The plugins validate our XML with reference to pkp-users.xsd which includes pkp-native.xsd. I get the following validation error:

Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://pkp.sfu.ca}publication' does not resolve to a(n) element declaration.

This can be reproduced by importing the following file found in the OJS 3.2 tarball using the native importexport users plug dashboard:


I know that this sample.xml file is not necessarily valid for OJS 3.2, but it gives the same validation error as above and illustrates the same issue.

Looking at line 223 in the following file:


I think that:

<element ref="pkp:publication" minOccurs="1" maxOccurs="unbounded" />

should be

<element ref="pkp:pkppublication" minOccurs="1" maxOccurs="unbounded" />

since the referenced element pkp:publication is not defined in that xsd, and pkp:pkppublication is defined.

After that change, the sample.xml still does not fully validate, but the validation error messages do not include the QName error shown previously.

This problem is not seen when using the Native XML Plugin, since that validates against native.xsd which does define a publication element.

Hi @jp_ecancer,

Thanks for checking the import/export plugin for the new version.

As you’ve said, sample.xml is not valid for 3.2.

Further more the publication element is not defined at pkp-native.xsd but at native.xsd file [https://github.com/pkp/ojs/blob/master/plugins/importexport/native/native.xsd#L44], extending the pkppublication element of the pkp-native.xsd. So both will be validated for the Article export/import.
Never the less, you are right, the pkp-native.xsd should be using the pkppublication element. I have filed an issue on that, in order to be fixed soon [pkp-native.xml uses publication element instead of pkppublication · Issue #5600 · pkp/pkp-lib · GitHub]

If you find any problems exporting/importing your content, please feel free to return to the issue.