OJS3 issue import sample xml file needed

Hi @farth,

Do you mean page numbers? It’s the <pages> element. it’s a sub-element of the <article> element.

If you’re getting an error message, please include it and I can take a look.

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

yes the pages numbers. Here’s the error message fort the import native tools :
Element ‘{http://pkp.sfu.ca}pages’: This element is not expected. Expected is one of ( {http://pkp.sfu.ca}title, {http://pkp.sfu.ca}prefix, {http://pkp.sfu.ca}subtitle, {http://pkp.sfu.ca}abstract, {http://pkp.sfu.ca}coverage, {http://pkp.sfu.ca}type, {http://pkp.sfu.ca}source, {http://pkp.sfu.ca}rights, {http://pkp.sfu.ca}keywords, {http://pkp.sfu.ca}agencies ).

And this is an entry that I use :

Précarité résidentielle et consommation de psychotropes.

Mercier C

Alarie S.

Thx in advance

Please see here for an Issue Sample (xml)

Hi @euser,

It looks like the elements are out of order – the <pages> element should appear at the end, off the top of my head. Try validating the XML against the XSD using a tool like xmllint (most XML editors will have a validation tool too).

Alec Smecher
Public Knowledge Project Team

This was what I used for exporting my former journal issues (full issue)
It worked like this.
For an individual article the should be the last element, you are right.

This was what I used for exporting my former journal issues (full issue)It worked like this.For an individual article the </pages> should be the last element, you are right.

Ok, I was expecting something like that but I’ve not had many time to test further this afternoon so thanks everyone for this. There was a last error in my import (missing role for author but this was trivial for correcting).

Thankss again.

I am novice in using OJS3. I installed it, and tried to import some back issues by Native XML Plugin. After hours and hours bad attempts finally I decided to put one test issue, export it as xml, and try to import new issue in same tipe. Removing error by error finally I’ve got

“Validation errors:
Extra content at the end of the document
The document has no document element.”

so I don’t know what to do next. In attachment is example.

Please, give me advice how to import old issues in OJS.
`<?xml version="1.0" encoding="UTF-8"?>

Fusce ac molestie tellus. - Yr. 53 (2016), No 3 (121)
Morbi interdum pretium sem - Yr. 53 (2016), No 3 (121)


<issue_galleys xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://pkp.sfu.ca native.xsd” />

Nunc massa justo Nam vel felis diam. Proin eget pellentesque neque, ut pretium tellus. Proin cursus odio a eros tincidunt gravida non non sapien. Vestibulum mattis sem nec est imperdiet convallis. Morbi et lacinia ipsum. Donec in aliquam odio. Suspendisse malesuada leo metus, consectetur volutpat nisl convallis ut. Nullam lacinia cursus purus, vel mattis mauris facilisis ac. Vivamus rutrum ante arcu, vel porta urna gravida ac. Aenean et enim laoreet, faucibus magna vitae, viverra odio. Mauris auctor nibh in consectetur dapibus. express procedure, postponement, on the priority question of constitutionality, France, the EU temp temp nomail@mail.hr PDF 683-694 Constitutionalization of patriotism Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut dolor justo, semper et odio ac, faucibus placerat quam. Suspendisse at commodo ipsum. Maecenas pharetra quam nec massa ornare, non posuere dolor tempor. Maecenas varius ante a fermentum faucibus. Pellentesque facilisis a lorem sed finibus. Aliquam efficitur urna eros, venenatis ullamcorper mauris volutpat a. Donec tempor ex quis lacus sagittis, nec dapibus nibh blandit. In hac habitasse platea dictumst. patriotism, constitutional patriotism, belief in the constitution, attachment to the constitution temp temp nomail@mail.hr PDF 695-727 `

Are you trying to export from OJS2 and import those XML files to OJS3? The scheme has changed so they are not compatible. This is a sample of the new XML: https://github.com/pkp/ojs/blob/master/plugins/importexport/native/sample.xml

No, I export and import in same version

Thank you for advice, I export and import in same version. I can try new sample, but it is just for one artical not for issue. Open Journal Systems

It looks like you are closing those two tags with />

<?xml version="1.0"?>
<issues xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
  <issue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" published="1" current="0" access_status="1">

Without that I have more errors:
Opening and ending tag mismatch: issue line 3 and articles
Opening and ending tag mismatch: issues line 2 and issue
Extra content at the end of the document
The document has no document element.

<articles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pkp.sfu.ca native.xsd" />

You are also closing the first articles tag there. I suggest that you do a basic validation first with for example http://www.xmlvalidation.com

Thank you a lot. I always tried to validate against native.xsd so validators ask too much additional, now I tried some simple and find possible error
… but even export of test issue give me remote tag for pdf link,
now I receive error

Element ‘{http://pkp.sfu.ca}file’: This element is not expected. Expected is one of ( {http://pkp.sfu.ca}name, {http://pkp.sfu.ca}seq ).

Have you some suggestion, how to declare pdf file for old articles in OJS 3?

I think the last error you have there is with the galley. You should have seq there and no mime_type inside the remote tag.

<remote src="http://www.pravst.hr/dokumenti/zbornik/2016121/zb201603_683.pdf" />

After 7 days of my attempts, I think you deserve very very big thanks and very very big coffeee :slight_smile:
We made it.

1 Like

I had way too many cups today already :slight_smile:


can you help me with additional information if you know.
I can’t find where to put ruth to pdf of issue_galley as tag?