JATS XML to embedded HTML article

I have noticed that all those parsers are not written by journals` stuff and all of them are suffer from imperfection :slight_smile:

In my DOCX2JATS project are used xsl TEIC stylesheets. After using them for awhile I have noticed that they miss a huge amount of data from tables. They are not capable to extract data from columns and rows number, especially when columns and rows are joined. So there is an urgent need to write own XSLT stylesheet
 Why is OOXML format so popular and complicated ?:confused:

Hi all,

@ajnyga, excellent work on that plugin! If you’d like a code review, or whenever you think it’s ready to add to the Plugin Gallery, please let me know.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks @asmecher

Code review sounds good. But I will first do at least the following:

  • add MathJAX and on/off selection to plugin settings (problem here is that it needs the async attribute in the script and this is not possible with addJavaScript, but I will use additionalHeadData instead)
  • clean unnecessary xsl
  • probably rebuild a simplified xsl processor based on the PeerJ code and the possibility to change the citations style based on the plugin settings. I do not know yet whether this is doable.
  • separate the xsl dealing with citations and add one option at this point
  • do some css styling (superscript note, referene list styles etc.)

Hi @asmecher,

If we have JATS XML mapped as PHP objects, can we display them right through tpl? And how it is done?

Do you mean something like {$foo.label}?

See http://www.smarty.net/docs/en/api.assign.tpl

Hmmm,

I will certanly need some help on that stage :slight_smile:
The idea is to create html on the fly by rendering xml. This would be good addon for Texture plugin, which is planned to be integrated with OJS, because editing xml will automatic affect html.

Did you notice that Texture is already there, inside the markup plugin? There are not a lot of functions available yet, though. What I would like to see in the Texture editor is a source editor mode, but probably they have considered it already.

Hi @asmecher

I have a updated version of embedGalley here: GitHub - ajnyga/embedGalley: OJS3 plugin for visualizing JATS XML galleys

That includes several changes to the xsl files, support for artwork images attached to the XML galley, and it also has a more groomed HTML layout and some tooltip functionality.

What I still need is the MathJAX support (not a big issue) and to remove the basically unnecessary PeerJ library. I actually only need the xsl files.

So this should be ready for review by the end of next week.

1 Like

Hi @asmecher,

The embedGalley plugin is now ready for code review: GitHub - ajnyga/embedGalley: OJS3 plugin for visualizing JATS XML galleys

At the moment it is hardcoded to use APA style in the ref-list, but I have changed the structure of the original XSL files so that adding new citation styles is fairly easy. That said, I do think that the XSL part still needs refining. But the rest of it you could check when you have the time.

1 Like

Hi @ajnyga,

Excellent, and many thanks as always for your active contributions!

On licensing and copyrights, we’re trying to keep everything consistent within our repositories – but since you’re writing this (correctly) as a separate plugin, you are of course free to license and copyright this as you wish. No objections to the way you’ve done it, just making sure you’re aware of the options. My hope is that third-party plugins will flourish, and the Plugin Gallery will bring together this disparate set of resources into one place for discovery and installation regardless of license/copyright specifics.

I’ve taken a spin through the code and it looks really promising.

Regards,
Alec Smecher
Public Knowledge Project Team

I hope that I still can count for you help, when php code, that transforms JATS XML to the PHP objects will be ready? :slight_smile:

1 Like

Thanks, I will check you comments and make the changes probably next Monday.

I am also happy to change the license markings I made there.

1 Like

of course, and if it turns out to be better than those xsl files, I will use it as well.

Thanks for this wonderful plugin.

Hi, you are very wellcome, I will try to fix some issues next week and will fix that css problem as well. The line height setting there is wrong.

The css file is in the plugin folder, so you can do it yourself as well. But I was thinking of adding a feature that allows a journal to add some custom css as well.

1 Like

After finishing my work with latex transformation, I have started the work with the plugin. Must say that despite many similarities PHP have many diferrences with Java. For example on Java I have wrote the recursive function for parsing sections, subsection sand subsubsections with one peace of code. But this don’t work with PHP.

@ajnyga, would it be possible,when all JATS data will be mapped to PHP objects, create HTML galley dinamically? Create tpl file for article, iterate through objects and put them in according html tags? For now I see that create static HTML from JATS is easy. But am doubting for dynamically created pages.

My idea is to refuse from HTML complitely

This is an awesome plugin. can we do the following?

  1. The main text followed by the Abstract directly
  2. Removal of the right sidebar and replace it with the information bar (DOI/ Citation Information bar)
  3. At the end, we can provide the graph of article downloads.
  4. Justify everything
  5. We can upload images just like we upload images in HTML ( I tried using Ajngya Lens Viewer, however there was no option like that). If we are planning to stop using HTML, then we need some outlet through which we can upload images.

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