OJS3 issue import sample xml file needed

I think we had a similar problem. We are currently trying to migrate an existing journal to OJS3 via the native XML-import plugin. If i get it right you just want that readers can download the fulltext on the journal homepage.

This is our approach. In the submission_file section we just encode a dummy textfile, because no one except the journal editors will see this file.

<submission_file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" stage="submission" id="92" xsi:schemaLocation="http://pkp.sfu.ca native.xsd"><revision number="1" genre="Artikeltext" filename="uploaddummy.txt" viewable="true" date_uploaded="2000-01-01" date_modified="2000-01-01" filesize="11" filetype="text/plain" user_group_ref="Zeitschriftenverwalter/in" uploader="OJS"><name locale="de_DE">OJS, Zeitschriftenverwalter/in, uploaddummy.txt</name><embed encoding="base64">VXBsb2FkZHVtbXk=</embed></revision></submission_file>

But in the article_galley section we just transmit a fixed path and a variable filename for each article. You have to use the tag remote src to transmit the path and not embed encoding:

<article_galley xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" approved="false" xsi:schemaLocation="http://pkp.sfu.ca native.xsd"><id type="internal" advice="ignore">92</id><name locale="en_US">PDF</name><seq>0</seq><remote src="http://pcubtestrg1.ub.uni-giessen.de/ojs/oldfiles/06_Review_Tutic2.pdf"/></article_galley>

This way you can circumvent to encoding of the file.

1 Like

It worked like a charm :slight_smile:
Thank you very much “florianruckelshausen”
You saved me a lot of time.
I am surprised why any of the staff members could not be this much helpful.

All the best

Hi all,

Thanks, @florianruckelshausen!

@euser, check your expectations – we are a small team, providing you with free software and free support, and are continuing to do so over the Christmas holidays.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Dear @asmecher
Thank you very much too.
You did help a lot as well by suggesting to verify xml files, which helped to form the issue import xml file.
To make a humble contribution, I am ready to provide the sample issue xml file if anyone needs.
Have a Merry Christmass and a Happy new year.
Regards

1 Like

Hi @euser,

Happy holidays to you too. I’m sure many users would find more sample XML useful.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi,
as I have the same problem, migrating form a paper journal to online one, I will really appreciate a sample xml (ideally an issue with an article). I’m not fond of xml and the documentation is lacking a more complete example.
Thx in advance

Hi @farth,

What version of OJS are you using? Have you found the example XML in the codebase?

Regards,
Alec Smecher
Public Knowledge Project Team

HI,
I use OJS 3.0.1. I have found the sample.xml file but it is not as complete as I would have expected, just one article and no mention of the galley stuff. The image example some comments above is more what I was looking for and is very useful but if I can have it in xml format, I could work on it and use it as a template for a python script to generate all my issues for archive.

Regards

Hi @farth,

There’s also this example that’s part of the Lens reader plugin; you might find it more useful.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
oh yes this look like a perfect sample. I have a question from what I have read above about article_galley and submission file: do i need to specify both of them or article_galley is enough ? TO make it clear, the journal will not use online submission for the moment. Could I just make a fake submission_file ?
Another question in fact, for some older archive, I do not have the article, only the abstract. In this situation, can I juste omit galley and submission file ?

Regards and thanks again for your quick reply, I do really appreciate your reactivity

Hi @farth,

If you want to have a galley, you’ll need both the article_galley and the submission_file. The article_galley entry refers to the submission_file, which will generally be a PDF or something. (The word “submission” here refers to an article as a whole, not the submission process.)

It is possible to omit the submission file but import a galley, if the galley is available at a remote URL.

Beyond that, submission files are totally optional.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok, thanks for everything !

Regards

Hi @asmecher,

I’ve got one (last I hope) question about the xml format: where do you specify the pages of the article ? Is it an element in the article or an attribute of some other element ? The first give me an error for the moment.

Thanks in advance

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.

Regards,
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 :

2
Précarité résidentielle et consommation de psychotropes.
13-19


 
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).

Regards,
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.