OJS3 and XML new viewer

Hi,

I’m not used to work with XML and I have a questions about it in OJS3.

1 - A JATS xml not contains the image inside the XML, right?
2 - Is possible save the image inside JATS XML?

I’ve tried to upload a XML in JATS format, but no article is showed, just a eternal loading. I uploaded a XML from PKP testdrive install and it works great. Why? If both are JATS, is there some version restrition?

Best regards,
Tarcisio Pereira.

Hi,

Some news?

Regards,
Tarcisio Pereira

Greeting,

  1. JATS xml not contains the image inside. You need to point URL instead.
  2. Think it is impossible. This is only markup language, not a graphical editor.

eLife Lens viewer works but this plugin needs some modification. Check javascript file. By default it is configured to work on https://elifesciences.org/ with their journal.

Hi @Vitaliy

If I’m not wrong, NativeImportExportPlugin exports XML with article pdf inside, base 64 I think.
Thinking in this way, it would be possible to include image within XML.
I ask this because if I want to include an XML in OJS, would have to host images somewhere else and inside OJS only the XML. But the ideal would host the images within XML inside OJS. Store the image elsewhere is not a complete solution for publishing XML.

What do you think about this?

Best regards,
Tarcisio Pereira

Good day,

I have never used NativeImportExportPlugin.
For publishing xml with Lens viewer I copy image in created directory inside OJS web access directory. Than simply put href link inside JATS XML file. It shouldn`t cause any increased vulnerability issues after pointing only “read” permissions.
If you want to store images outside the OJS web access directory maybe there is the need to create some sort of symbolic link (I am not experienced in this). You may host images on other server and simply point the URL to them.

There maybe the problems in href links inside Lens javascript files. To resolve them just changed “hrefs” according to yours.

And once more, XML is just markup language. It stores only text. Even in latex environment one can create only simple graphical symbols.

Hi,

Manualy copy images is insane, I’m talking about (today) 159 journals, 5284 issues and 75627 articles. I have a huge instalation.

It would not be possible import a .zip containing the XML and images? So the system itself could put images in the right place.

Regards,
Tarcisio Pereira

If you are talking about JATS XML and Lens viewer you can change all links by editing lens.js file. So you will have link to your image directory. If about other - I don’t know…

Best regards.

1 Like

If you have a set of journals, issues, and articles which you want to import into OJS3, the NativeImportExportPlugin will probably be your baseline to perform that function. If the actual article galley which you import is JATS, hopefully the Lens XML viewer will be able to display it. It seems the images would need to be xlink reference to external files, which files OJS 3.x also supports (at least in theory!). This is partly speculation on my part. How well the existing XML viewer code might handle that would be something which @axfelix could clarify.

Migrate isn’t exactly my point.
I want to use eLife Lens viewer.
I already have a XML and images inside a folder.

How to import both?
If I just import XML, I will see no images. How to import images? How to keep xml AND images together?

I do not know if I explained right, sorry any language error.

Best regars,
Tarcisio Pereira

Greetings,

Have you got links to images in your JATS XML files?

Are these existing articles already in OJS? If so, I think what you are wanting to do is add new submission files to each article: namely, adding a number of images as new submission files, and adding a JATS submission file which references those image submission files via xlink. I don’t think the NativeImportExportPlugin is smart enough to modify existing articles, but you might be able to modify the plugin to support that (it would be a pretty awesome enhancement!). Alternately, you could export all existing articles via the NativeImportExportPlugin, modify the XML to add the JATS and image submission files, and re-import into a new instance. This would lose prior submission history.

If these articles are not already in OJS, then I think it is just a matter of using the plugin to import new JATS and image submission files into new articles.

Yes, just a simple relative link, not absolute, but @ctgraham gave me a light.

@ctgraham
Yes.
Thank you by your answer. I need submit images as submission files, and then put the right link inside XML. That was my question.

Thank you both, @ctgraham and @Vitaliy .
Best regards,
Tarcisio Pereira

Hi

I have not yet been able to make the XML view work.
Is anyone getting it? I’m stuck on loading forever.

Tarcisio Pereira.

Hi @Tarcisio_Pereira,

Have you checked your browser’s Javascript console for errors?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Console:

lens.js:8189 Uncaught Error: No suitable converter found for this document
    at LensController.convertDocument (lens.js:8189)
    at Object.<anonymous> (lens.js:8221)
    at j (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at x (jquery.min.js:4)
    at XMLHttpRequest.b (jquery.min.js:4)
convertDocument @ lens.js:8189
(anonymous) @ lens.js:8221
j @ jquery.min.js:2
fireWith @ jquery.min.js:2
x @ jquery.min.js:4
b @ jquery.min.js:4

Regards,
Tarcisio Pereira

Hi @Tarcisio_Pereira,

Have you validated your JATS XML?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

How can I validate it? I probably don’t know how to do it.

Regards,
Tarcisio Pereira

Hi @Tarcisio_Pereira,

How did you write the XML? (What kind of editor are you using?)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

The origin of XML is diverse. Journals usually hire a company to provide the XML, and the contracted companies vary from one another. It can happen to a magazines hire several companies, it is not always the same.
If I’m not mistaken this is done to send XML to Scielo. The company delivers the XML to the journal that sends the XML to Scielo.
So I understand, we need to validate the XML? How can we do that?

Regards,
Tarcisio Pereira.

Hi @Tarcisio_Pereira,

Any XML editor/toolset should be able to validate XML using one of two common methods – DTD or XML Schema – depending on what the standard’s maintainer uses to describe the standard. JATS uses XML Schema. See JATS: Journal Publishing Tag Set: XSD for information on the schema and how to get it. On my Linux system, I use xmllint to validate XML against the schema.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like