I had cleared the cache before I wrote my comment, but it wasn’t working. Thank you very much for the link to the working examples on elifesciences.org – I managed to figure out a bug in the conversion process of our XML (wrong metadata delivery). Now it’s working!
Hi @Richard_Pilbery, I have the doubt, are there other ways to make a XML file compatible with the Lens Viewer? You added a working xml file in your answering post that’s why I asked you, If you know a way to make a xml file from a .doc or .pdf files. I hope you could answer, thansk and greetings.
Hi @Richard_Pilbery thanks a lot for your response, I will check meTypeset from Martin Paul Eve, I used the Open Typesetting Stack from PKP and I got a XML file that I can use with Lens Viewer, however I wanna know if there are other ways to get a XML file.
Hi @Richard_Pilbery I followed your suggestion of using meTypeset from Martin Paul Eve for make a JATS XML file from my docx document, I checked your JATS XML file that you mentioned it in a post before, in that XML file you said what command you use for made it: ./meTypeset/bin/meTypeset.py docx input-filename.docx docx sample --interactive --zotero
then I used that same command with my document, however I can’t get the same result in the JATS XML document as you have in you xml document, precisely in the reference list. That’s why I asked you how you prepared your docx document before the parsing. I tell you that I have my docx document with citation and a list of bibliographic references to the last of my document and I added them with the Zotero extension for LibreOffice. I left my section of references list here:
<ref-list>
<ref id="ID7dcf9519-6c6f-4513-bebd-29906a230e24">
<mixed-citation>Darwin, C. (1859). <italic>On the Origin of Species by Means of Natural Selection, or the Preservation of Favoured Races in the Struggle for Life</italic>. London: John Murray.</mixed-citation>
</ref>
<ref id="IDdf3ef8e7-a7e7-41f3-90da-0bb64e5d678c">
<mixed-citation>Lamark, J. B. (1809). <italic>Philoshopie zoologique</italic>.</mixed-citation>
</ref>
</ref-list>
But I want some like this
<ref-list>
<ref id="IDa30d0966-cd34-448b-a969-f529a02822f8">
<element-citation publication-type="bookchapter">
<person-group person-group-type="author">
<name>
<surname>Kay</surname>
<given-names>G. Neal</given-names>
</name>
<name>
<surname>Dosdall</surname>
<given-names>Derek J.</given-names>
</name>
<name>
<surname>Shepard</surname>
<given-names>Richard B.</given-names>
</name>
</person-group>
<article-title>1 - Cardiac Electrical Stimulation</article-title>
<source>Clinical Cardiac Pacing, Defibrillation and Resynchronization Therapy</source>
<date>
<year>2011</year>
</date>
<publisher-loc>Philadelpia</publisher-loc>
<publisher-name>W.B. Saunders</publisher-name>
<fpage>3</fpage>
<lpage>39</lpage>
</element-citation>
</ref>
<!--Kay, G. N., Dosdall, D. J., & Shepard, R. B. (2011). 1 - Cardiac Electrical Stimulation. In Clinical Cardiac Pacing, Defibrillation and Resynchronization Therapy (4th ed). Philadelpia: W.B. Saunders. Retrieved from http://www.sciencedirect.com/science/article/pii/B9781437716160000011
-->
<ref id="IDb8cd7093-a0d4-4ab1-a7a2-49beec15cbfb">
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Rang</surname>
<given-names>Humphrey P.</given-names>
</name>
<name>
<surname>Dale</surname>
<given-names>Maureen M.</given-names>
</name>
<name>
<surname>Ritter</surname>
<given-names>James M.</given-names>
</name>
<name>
<surname>Flower</surname>
<given-names>Rod J.</given-names>
</name>
<name>
<surname>Henderson</surname>
<given-names>Graeme</given-names>
</name>
</person-group>
<source>Rang & Dale's Pharmacology</source>
<date>
<year>3-31</year>
</date>
<publisher-loc>London</publisher-loc>
<publisher-name>Churchill Livingstone</publisher-name>
</element-citation>
</ref>
<!--Rang, H. P., Dale, M. M., Ritter, J. M., Flower, R. J., & Henderson, G. (2011). Rang & Dale’s Pharmacology (7th ed.). London: Churchill Livingstone.-->
</ref-list>
I hope you can help me, thanks a lot for your time.
In the folder meTypeset, there is a subfolder called bin. Open the settings.xml file and find the mt:zotero</mt:zotero> tags. The filepath to your Zotero database needs to go here. I have a feeling that I exported mine and place it in the root directory where I was testing my XML setup as I could not get it to work when I referenced the original database. I’m running OSX v10.12 so it might be different if you are using an alternative setup.
Hi,
I’ve been away for a while but last week I tested the OTS plugin on a demonstration OJS3 instance - http://lib-garnett.lib.sfu.ca/ojs-plugin-alpha-9/index.php/mxn/article/view/1/4 - unfortunately with the same result as described above.
Have you reached any conclusion of how to solve the problem or have I overlooked a point?
Regards
PS I really look forward to see it working. It’s such a great tool integrated with the OJS.
Greetings @nef,
I see from where your problem may arise. OJS seems still using old version of Lens Viewer. And I remember that an old version had many strange issues. For example for being properly processed journal publisher tag must contain eLife sciences as a publisher. I suggest to dowload new version of the plugin from their github repository.
Here is the link to the latest release: Releases · elifesciences/lens · GitHub
You just need to download and unpack lens-2.0.0.zip and overwrite corresponding files in the plugins directory. From you web root it will be here: plugins/generic/lensGalley/lib/lens
Don’t forget to make a backup just in case. I haven’t got any troubles in upgrading process.
Hi,
Thank you for the answers, but I’m using a demonstration OJS3 instance for my testing set up by the OTS team, so I guess I can’t make an update.
Regards
Niels Erik
For all interested in why JATS XML viewer in loading internal by Lens Viewer.
It is happens mostly because lines like this in lens.js: this.test = function(xmlDoc, documentUrl) { var publisherName = xmlDoc.querySelector("publisher-name").textContent; return publisherName === "eLife Sciences Publications, Ltd"; };
(lines 5086-5089)
First Lens Viewer checks the content of several tags in JATS XML, like “publisher-name” for example.
An than, if they are not containing specific for elifesciences information, Lens stops the conversion.
this.convertDocument = function(data) {
var doc;
var i = 0;
while (!doc && i < this.converters.length) {
var converter = this.converters[i];
// First match will be used as the converter
if (converter.test(data, this.config.document_url)) {
doc = converter.import(data);
}
i += 1;
}
if (!doc) {
throw new Error("No suitable converter found for this document", data);
}
return doc;
};