Help DOC2JatsXML Check this file

Hello, I am trying to upload a JATS XML file, but it doesn’t work, it goes as loading… and nothing happened.

I am using the open source of Vitality GitHub - Vitaliy-1/DOCX2JATS: Java project, aimed to facilitate DOCX to JATS XML transformation for scientific articles

This is my XML result:

https://drive.google.com/file/d/1QgCxIP3oVKhl60MhvPC_VWcGFrxwHQfa/view?usp=sharing

Anyone can please help me cheking what is wrong??

Hi @josuevalrob,
Your some references contains no names at all. Most likely that is the problem. Try to make at least one name of author for each reference and try again.

However, your XML file needs few hours work on Tables and Figures to improve its appearance.

Best regards,

2 Likes

What are you using to display JATS XML?

the lens viewer provided by OJS.

Don’t know about Lens Viewer but you can use Old Gregg theme for displaying JATS XML: GitHub - Vitaliy-1/oldGregg: Theme for OJS 3 with Bootstrap 4

I mean, the default xml viewer.

I will try that theme…

I had include the same references from the example files.

https://drive.google.com/file/d/1zcEz-xBYq0_t5U3Qn4LHZ0qOg2qpmsKf/view?usp=sharing

But is not working… .

What errors do you see in the browser’s console log?

1 Like

Is a long message, you can check it here:
http://5.56.56.37/cedex/index.php/ingenieria-civil/article/view/417/1261

error:
FIXME: every section should have a title

Uncaught TypeError: Cannot read property ‘getAttribute’ of null

“every section should have a title” → check if every section has a title.

“Cannot read property ‘getAttribute’ of null” → something related with figures.

1 Like

Done, I reorganize my document.
https://drive.google.com/file/d/13jy-vGWjPEMF_-7RvTGlalqBbZNoEgWn/view?usp=sharing

It has some tables with images inside, so I did a new wrapped image from that…

image

The problem now, is that the jat convert doesnt work… This is the error message:

Exception in thread “main” java.lang.NullPointerException
at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(Unknown Source)
at doc.transformation.xml.transformerFigures.transformerFiguresImpl(transformerFigures.java:64)
at doc.transformation.xml.docIngestion.ingestionAndTransform(docIngestion.java:122)
at doc.transformation.xml.docIngestion.main(docIngestion.java:52)

image

The typical DOCX file for DOCX2JATS should be formated slightly different. Table and Figure title should be right before the table or figure. Table and Figure title shouldn’t be bold or italic. And another part of a caption right after the table or figure and starting with asteristics.

I’m am planning to make a plugin that would parse DOCX better, but right now fisishing the work on JATS to PDF converter.

You can also use PKP’s software for parsing DOCX: http://pkp-xml-demo.lib.sfu.ca/

1 Like

Okey, is working now! http://5.56.56.37/cedex/index.php/ingenieria-civil/article/view/417/1261#toc

But I dont have any image!

We are doing some part of work manually. For figures the typical code inside JATS is:

<fig id="fig1">
            <object-id pub-id-type="doi"/>
            <label>Figure 1</label>
            <caption>
               <title>This is an example of caption <xref ref-type="bibr" rid="bib12">12</xref>.</title>
            </caption>
            <graphic xlink:href="fig1.jpg"/>
</fig>
1 Like

okey, thank you very much!