JATS XML to embedded HTML article

Hi,

I was thinking about this because I started to think how using the current embedGalley would affect the statistics. I mean, an article full text view is based on galley view at the moment, so the embedded galley does not get counted. I do think that generating a dynamic galley would be possible. I have to look at this next week. Monday is actually a holiday in Finland, so not tomorrow.

Most of the things you listed can be achieved with a custom theme plugin. I do not think that they are within the scope of embedGalley plugin.

I am preparing a theme where I am moving things like statistics and “how to cite” to tabs. Like in plosone: http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0172607
This creates more room to the article page.

About item 5, see Allow artwork files for XML galleys by ajnyga · Pull Request #1353 · pkp/ojs · GitHub

hi @ajnyga
I have been trying to install this plugin in my system, OJS 3.02. But each time it says “cannot install, there is no folder …”. My zip file name is embedGalley.zip and there is a folder embedGalley in that zip. All other files are within that embedGalley folder.

Regards
@anupent

Hi @anupent
I also got the same error when trying to upload the plugin through OJS platform. I uploaded it directly to the server through cPanel. You can also use the same procedure if you have direct access to the server or through FTP access.

1 Like

Thanks @hannanhazari

I did like you said, but could not get full text under the abstract even after the plugin was activated. Furthermore, my footer got lost. I got it back again after deactivating the plugin.

Regards
@anupent

@anupent
Please see the following post. Minor coding is required.

1 Like

Thanks. It worked fine for me. Waitingfor your theme. :slight_smile: However, I was able to justify the references text by modifying the .css file. Could you please tell me how to justfiy the entrie text?

I think that uploading a plugin to OJS requires a .tar.gz format. So you would have to download the plugin first and the pack it to tar.gz. I usually upload plugins straight the plugin folder.

What is the name of the folder the plugin is in? Does it include “-master”?

Did you try to validate your XML file?

Edit: and please all note that this is plugin under development, so it definitely has some issues.

I have successfully managed recursions in PHP :slight_smile:
So near 1/3 of work is done. Now most tags in XML article body are mapped into objects. As example I have produced an HTML output of all, what is done:
https://github.com/Vitaliy-1/JATSParser/blob/master/test.html
and how it looks like with css:
https://vitaliy-1.github.io/JATSParser/test.html

So what is left is figures, tables and references. Hope it will be possible completely refuse from HTML as intermediate format. For example sections here is an ArrayObject, that contains article sections with all the data as objects. When reference section will be done I am planning to add it too. As for meta-data from JATS → don’t really know what to do with it. Do we need to use it from JATS or can simply use this data from OJS?

@ajnyga & @Vitaliy

Some errors occuring due to embedGalley plugin.
See the post Article display page behaving differently

Hi! @ajnyga

I am using the plugins and I have the following problem:

When I click on the reference numbers [1], [2], [3], etc. I’m referring to the references but then I can not see the rest of the article…

I am using the plugins with the most recent modifications … May 12, 2017

Thanks for this plugins!!

thanks

do you mean that the article body disappers after clicking? Those links should only include an anchor to the bottom of the page which has the references listed. I am planning to add a return link there later, but you can just scroll back for now. I did add a hover effect to the links so that you can see the actual reference without clicking it. If I can find a decent script to do it, I will probably change that hover effect so that you can also click the DOI/link included there. This way there is no need to go to the bottom of the page at all to see the references.

Also note that the plugin is still under development. I have scheduled time for tomorrow to fix the issues I know and go through the comments Alec gave me some days ago.

1 Like

Also please change the background of the images to white with a border covering the entire Image + Caption. If that is possible. Also, there were few issues in which the right sidebar was disappearing. I liked that infact. There is no need for the right sidebar during reading the HTML. We can transfer the Information to the right sidebar and delete the right sidebar (blocks) if possible.

Hi,

Looks great @Vitaliy. Do you have any knowledge how this solution compares to using XSL, I mean which one is faster? I like to fact that this solution gives a lot more controll over manipulating the output.

Are you planning to support differente reference styles? I was thinking with embedGalley that would it be possible to use the OJS citation plugins for filtering, with XSL it was not, but in this case maybe. But it could be that those only support journal citations.

As for metadata, in my opinion it should not be included, because you can handle the OJS metadata output with a theme plugin if you want. And it should be the exact same metadata both in OJS and XML.

I was also thinking about the dynamic galley solution. There are two models:

  1. Creating a fully dynamic galley: the plugin creates a new galley link to the sidebar and clicking that link opens a converted HTML article. The problem here is that the link to a galley includes a unique number. I am not sure if this is possible to achieve dynamically.
  2. Creatin a semi-dynamic galley: this is the same solution as in lensGalley. Basically you click the XML galley link and a converted HTML opens. This would be very easy to achieve. I could just combine the embedGalley and lensGalley plugins to create something like this. I think that with this model you could achieve the HTML galley format you have in you journal fairly easily.

In our case for now we use xslt transformation with saxon to convert JATS to HTML and Java written app with DOM and XPath to convert JATS to LaTeX. Second approach without xslt is definitely faster. Although to really feel the difference XML file should weight at least several MB or one should make a 1000 operations simultaneously. XSLT benefit is only that it requires less code to write. But it is a huge library itself with many lines of code, that affects the processing speed.

To start thinking about different citation style I need more info about concept of citation plugin. What it does? Also what should be prefered output of the JATS parser: my custom PHP objects with getters or PHP DOM with ready HTML inside?

As I previously thought we could transfer all references into OJS database from PHP objects, so we could retrieve it in any form. Although I had never manipulated database content before. Neverheless the reference in PHP will have a form of an object with getters. Authors names and surnames will have a form of associated arrays or arrayobject

Hi,

I mean the plugins here https://github.com/pkp/pkp-lib/tree/master/plugins/citationOutput (check the filter folder of one plugin there)
But it could be that those will not handle all the necessary content. But should we work on those to add support for different content types? @asmecher?

I am not sure what the current situation of these plugins are, if they are used at all in OJS. I think that they use them at least in the “How to cite” function.

I think that PKP has plans to manage references with the aid of JATS XML. So saving reference data to OJS database sounds like a good idea. This is data that could be useful in for example CrossRef services. Maybe @asmecher could comment this as well? At the moment references are saved as a simple text field.

1 Like

I want also tag @asmecher :slight_smile:

Have you an example how to add data from PHP objects to the OJS Database? I know (in theory) how to add data in mysql database with PHP, but I think OJS (Smarty) is a special case. If you can give me a hint I would test it on my local OJS installation (after JATS parser will be ready).

In addition I have found manuals how to get data from mysql with smarty, but not how to set…

@ajnyga @Vitaliy Check out this journal. Might help you make some new amendments.
http://journals.co-action.net/index.php/acmo