Plugin for displaying JATS XML on article detail page under abstract for OJS3+

Greetings to the community.

I have finished developing a plugin for displaying article in JATS XML format just under article abstract. Link to the project: GitHub - Vitaliy-1/JATSParserPlugin: OJS3 Plugin for parsing JATS XML and displaying it on article detail page


  • PHP7+. Could be easily adapted to use for older versions but I don’t see sense for this.

  • Modified default Manuscript theme (originally made by @NateWr): GitHub - Vitaliy-1/defaultManuscript: default Manuscript theme for use with jatsParser plugin
    you can make own theme with Bootstrap and JQuery. We add it to our theme plugin. It is fairly simple. Download bootstrap from the official site somewhere in the web root and put a link to it. For example in my case it is in plugin/themes/child-theme/styles/bootstap. Example of adding bootstrap from,php:

      public function init() {
                      $this->addStyle('my-custom-style1', 'styles/bootstrap/bootstrap.min.css');
                      $this->addStyle('my-custom-style2', 'styles/bootstrap/bootstrap-theme.min.css'); 
                     $this->modifyStyle('stylesheet', array('addLess' => array('styles/index.less')));
                      $this->addScript('my-javascript1', 'js/jquery.min.js');
                      $this->addScript('my-javascript2', 'js/bootstrap.min.js');

more info about theming:

That’s all. Don’t forget to rename jatsParser-master to jatsParser and defaultManuscript-master to manuscript-jats after download. Link to how your article detail page will look like: Evaluation of the evoked brain potentials of patients with asthenia and anxiety symptoms and the partial loss of sight | Psychosomatic Medicine and General Practice

What plugin does:

  1. Parses data from JATS XML.
  2. Records data into POPO
  3. Displays them on article detail page through Smarty templates
  4. Actually it does the same as Lens Viewer, but the way like we want.

What is supported:

Don’t forget that plugin should be used with modified default manuscript theme or you can modify article_detail.tpl, header.tpl and article.tpl in your theme accordingly.

Thanks to @varshilmehta for testing.


Just wanted to know that what is the difference between yours and Ajngya’s (Embed) plug in.

Basically for now they done the same: displaying article on the article detail page.

Like I have wrote about JATSParser plugin :

  1. Parses JATS XML with PHP
  2. Records data into PHP Objects
  3. Display it through Smarty templates.

As I know about EmbedGalley plugin it:

  1. Transforms XML to HTML with XSLT stylesheets for JATS
  2. Display the result HTML

So the differences are:

  • language: PHP vs XSLT

  • data storing: PHP objects vs none

  • data presentation: Smarty vs HTML

So as you can see they done the same, but with different mechanism. It is a debatable question what approach is better. But writing all the data into PHP objects gives an opportunity to make different operations with these data using PHP language.


So, most of the front-end is done. Recommend by author plugin requires correction (it is not working properly in my case). Other seems to be finished. Link to an example: Evaluation of the evoked brain potentials of patients with asthenia and anxiety symptoms and the partial loss of sight | Psychosomatic Medicine and General Practice

One thing that I don’t like is tabs (from jquery ui) because of slow loading. Bootstrap in this case is better :slight_smile:
@hcl, do you look for such article_detail page functionality?

Need to add that plugin will not look like that from the scratch. It requires changing structure of several tpl theme files. If someone is interested in implementing I can provide them.

1 Like

I will try to look at the collision with recommend by author plugin tomorrow. Just have not had the time during the last few weeks…

There is another problem with this plugin. In my case it works only for primary locale (English), but not for secondary.

I am using PHP7. Tried PHP 7,1 as well. After copying the plugin to the directory, the plugin page is ever loading. What should i do?

Hmm. I already tried this plugin on 2 systems (Windows and Ubuntu) and all works fine. The problem may be in:

  1. JATS XML file, which causes errors while parsing.
  2. Incompatibility with your theme.
  3. Conflict with other plugins.

First I recommend to make a back-up of site and database and deploy them on a local machine (with XAMPP it will not take much time). Then to test plugin there. You will see all errors in the error log. I can tell more about the error only when see it.

Also please note, that beyond activating plugin. there will be a need to modify (or rewrite) files in your child theme. I have changed slightly the structure for templates for article detail page. Also I will take a look at default theme, adapt it to the plugin and place it on github, maybe on this or next week.

Hi @Vitaliy,
Yes, we look for such article_detail page functionality.
When I will have some time, I will test it.
Thanks, Helene

I tried on the localserver (newly installed ojs 3.0.2 on my computer). Did not work there as well. The lugin page keeps on loading

What errors do you see in apache/php error log? Can you post it here?

I also will check from clean install. Maybe there is a need to change some paths that are specific for our journal.

OK. Just tried on fresh install with default theme. All works fine. My steps:

  1. Installed fresh OJS 3.0.2
  2. Downloaded plugin from the github
  3. Unpacked it an renamed directory to the: jatsParser.
  4. Checked the plugin in the admin panel.

What you should see on the published article detail page:

It is published article (all content) with 2 abstracts. Later I will make an example of child theme to display it all correctly.

Do you confirm, that done all this steps?

1 Like

It worked now. Also worked on my journal, however with issues.

  1. We need a proper theme like you said,
  2. the references are not getting parsed.
  3. tables are mis aligned.
  4. Tabs are not present (Metrics etc)
  5. We dont have that sections of the article like you have (Abstract, Introduction, references etc)
    Can we also reduce the width of the right side bar (Info)

Awesome work though. Thanks a lot :slight_smile:

This is all because article detail page must be changed. It is easy, I will create examples shortly. The reference section is not parsed when it not contain title. This was done deliberately. Maybe this is the reason. I will need take a look at your JATS XML later.

Yep. And they are parsed with my plugin. But they need to be slightly differently formated. Keep in mind alsi that these parsers are written in very different languagues and have different concepts.
But don’t worry, it all can be easily adapted to different JATS XML markup, (not beyond NISO JATS stadard )

Cool. Will wait for your theme cos without proper theme this is not so user friendly and can not be used. Thanks.

Impressive work done here. Thanks a lot @Vitaliy to share this.

BTW, I like the solution you found for the citation references but I have a doubt: Why not using the same templates than the citationFormats? or directly call the functions of this module…


We have citations only from JATS XML. There is no any reference manager in OJS3, isn’t it?
So all data for references comes from JATS and is transferred with setters to PHP objects: (classes BibName → author names, BibitemBook, BibitemJournal etc → journal article, book references.
Then it is exposed to front-end with templates:

The templates can’t be the same with citationFormats because we have different classes and methods. This plugins are unrelated with each other. I was planning in the future to write a method for writing citations in the database and write a plugins for editing them and export in different formats (bib, ris etc)

Or can you explain more how citation Formats plugin can help in this case? maybe I am missing something.


I think I suggested the same thing to you originally, but the OJS citation plugins have one central problem: they only apply to journal articles (they are used for example in the “how to cite” view). In this case also other citation formats are required for books, conference papers etc. So either the OJS citation plugins need to extended or you have to use your own.