OMP DOI plugin - How to export crossref XML?

Dear @ajnyga
Thank you for sharing this plugin with us.
I installed it on two OMP 3.3.8 sites. One of the sites gave a 504 gateway timeout, and I couldn’t reach the plugin interface (to enter the username & password, and to deposit a book doi). On the other site, I entered a valid CrossRef username and password. But I get the following error message when I tried to deposit a doi. Hope, this may help to improve the plugin,
I noticed that the orcid id information is located within the person name tag.
Regards,

##<?xml version="1.0" encoding="UTF-8"?>
 <doi_batch_diagnostic status="completed" sp="a-cs1">
 <submission_id>1435065238</submission_id>
 <batch_id>_20221225193122000</batch_id>
 <record_diagnostic status="Failure">
 <doi />
 <msg>Error: cvc-datatype-valid.1.2.1: '' is not a valid value for 'NMTOKEN'.
 Error: cvc-attribute.3: The value '' of attribute 'language' on element 'book_metadata' is not valid with respect to its type, 'null'.
 Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ORCID'. One of '{"http://www.crossref.org/schema/4.4.2":given_name, "http://www.crossref.org/schema/4.4.2":surname}' is expected.
 </msg>
 </record_diagnostic>
 <batch_data>
 <record_count>1</record_count>
 <success_count>0</success_count>
 <warning_count>0</warning_count>
 <failure_count>1</failure_count>
 </batch_data>
 </doi_batch_diagnostic>
 
 (403 Forbidden)##

The xml code produced by the plugin is here

<?xml version="1.0" encoding="UTF-8"?>

<?xml version="1.0" encoding="utf-8"?>
<doi_batch xmlns="http://www.crossref.org/schema/4.4.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1" xmlns:ai="http://www.crossref.org/AccessIndicators.xsd" xmlns:rel="http://www.crossref.org/relations.xsd" version="4.4.2" xsi:schemaLocation="http://www.crossref.org/schema/4.4.2 https://www.crossref.org/schemas/crossref4.4.2.xsd">
<head>
<doi_batch_id>_20221225192738000</doi_batch_id>
<timestamp>20221225192738000</timestamp>
<depositor>
<depositor_name>Editör</depositor_name>
<email_address>editor@adlitip.net</email_address>
    </depositor>
<registrant>Turkforensic Test Yayınevi</registrant>
  </head>
<body>
<book xmlns:default="http://www.crossref.org/schema/4.4.2" xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1" book_type="edited_book">
<book_metadata xmlns="http://www.crossref.org/schema/4.4.2" xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1" language="">
<contributors>
<person_name contributor_role="author" sequence="first">
<ORCID>https://orcid.org/0000-0003-4946-3826</ORCID>
          </person_name>
        </contributors>
<titles>
<title>Adli Tıp ve Adli Bilimler</title>
        </titles>
<jats:abstract xmlns:jats="http://www.ncbi.nlm.nih.gov/JATS1">
<jats:p>Adaletin... Rehberi</jats:p>
        </jats:abstract>
<publication_date media_type="online">
<month>07</month>
<day>02</day>
<year>2019</year>
        </publication_date>
<isbn media_type="electronic">9786052584446</isbn>
<publisher>
<publisher_name>Turkforensic Test Yayınevi</publisher_name>
        </publisher>
<doi_data>
<doi>10.37609/akya.1</doi>
<resource>https://books.adlitip.net/index.php/tf/catalog/book/9</resource>
        </doi_data>
      </book_metadata>
    </book>
  </body>
</doi_batch>

Thanks,

Hard to say what is wrong in the first case, would need to see a php error for that.

Error: cvc-attribute.3: The value '' of attribute 'language' on element 'book_metadata' is not valid with respect to its type, 'null'.
What is the language of the publication? The language attribute mentioned there is set with PKPLocale::getIso1FromLocale($locale) so it seems like whatever the locale is that function is returning null.

Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ORCID'. One of '{&quot;http://www.crossref.org/schema/4.4.2&quot;:given_name, &quot;http://www.crossref.org/schema/4.4.2&quot;:surname}' is expected.
This is probably because there is no author name available and Crossref is expecting to see that data before ORCID. I am not sure if it is possible to register content without an author name.

Hi @ajnyga!

First, thanks so much for sharing your plugin!
The Datacite plugin is now part of the plugin gallery. Would it be possible to integrate your code to that plugin, so we maximize future compatibility efforts? Have you suggested this to @Dulip_Withanage?
Thanks again!

Thank you @ajnyga for developing this and the other handy plugins for OMP! They will have a massive impact on our workflow.

When I tested it for anthologies, the Crossref XML Plugin seem to be putting both volume editors and chapter authors in the main tag (under <book_metadata> or <book_series_metadata>). I expected it to be only editors in this tag, and then the chapter authors in the tag for each chapter. So now the chapter authors appear twice in the XML.

I’m not sure if it’s due to the plugin or the way we’ve entered the metadata. Any comments on this would be appreciated :slight_smile:

Hi @mannemark

Did you check what the Crossref guidelines say about this? In case it is not according to their guidelines, let’s change that in the plugin. It does sound like that is a mistake.

oh, I think the problem here is of course that in OMP editors and chapter authors are basically the same role. You can not distinquish between them because “Editor” and “Author” there are just labels which any publisher can edit.

@asmecher this is a similar problem as we have with translators vs. authors. We would really need more defined contributor data in the applications. I am not sure if CREDIT would solve this problem either like it does not solve the translators vs authors problem.

But your plugin can distinguish between them, in the XML output I get either “editor” and “author” as values in the contributor_role attribute. I’m guessing it gets the editor role from the check box " Identify this contributor as the editor of this volume." instead of from the selected role then perhaps?

Regarding the Crossref guidelines they actually seem to imply that chapter authors should be in both contributor tags. But I don’t think it’s entirely clear, and the examples from Crossref do not really make sense to me. https://www.crossref.org/documentation/schema-library/markup-guide-record-types/books-and-chapters/. I’ve reached out to Crossref for clarification, will post here as soon as I get a response.

All the best,
Magnus

Just received word from the support at Crossref. They admitted that the information on their web was unclear but told me that the my interpretation was correct, editors should be in the book metadata, chapter authors in each individual article.

Thanks for finding that out.

The way I distinguish between the contributors now is that I check which contributors are attached to chapters.

Like I mentioned, in the user permission level both chapters authors and volume editors are ROLE_ID_AUTHOR (a constant used in the code) so we can not use the roles to distinguish the difference. Of course the labels for the roles are different, but since they are editable, those can not be used either because if a press would edit the label, the plugin would not work as expected.

Of course I could just add the contributors to the book level in cases where they are not mentioned as chapter authors. But that would not work in situations where the volume editor is also selected to be the author of a chapter, which is also very likely.

So to be honest, I do not have an easy fix for this.

Edit: just to add a screencapture of the current roles in OMP regarding this issue. Author in the permission level column means that in code level these roles are identical and we can not distinguish between them. Like I mentioned, this is also a problem with Translators.

Screenshot 2023-03-30 at 13.35.53

In my opinion the problem comes from the situation where we try to use the same taxonomy for defining user rights within the system (applies to the users table) and contributors roles (applies to the authors table). These should be separate.

OK, thanks for the explanation. Just a final check: it’s not possible to use whatever happens in the code when checking this box?

Either way it’s not a huge problem, we can simply export the XML files and clean them and upload manually to Crossref in the meantime. It’s still way better than the solution I was using before. So thank you once again for the great work!

I’m also wondering if the plugin can handle CC-license metadata. It doesn’t seem to include any license from my testing, so once again I’m wondering if it’s the plugin or our metadata that could be the problem.

haha, I actually already do: datacite/CrossrefExportDeployment.inc.php at crossref · ajnyga/datacite · GitHub

I probably should not try remembering what I’ve wrote but read instead :smiley:

I have to rethink the logic there. Probably
a) if volume editors exist, only show these contributors in the book level
b) if no volume editors exist, show all contributors also in the book level

Because probably we can not have an empty contributors element in the book level, so if we have a case where OMP has an Edited Volume with just Chapter authors added and no specified Volume Editors, then we need to add the Chapter Authors both in the book level and the chapter level.

Regarding the problem I mentioned above, the tick box does solve it, but I think it is a half-measure and only solves one specific contributor distinction in the system while we should support more distinctions.

1 Like

Looking forward to seeing the development in the future, in the meantime this is working really well for us anyways.

I just thought I’d add a comment about the “export” and “deposit” buttons. They are not functioning as buttons, you have to click the text inside the button. If you click the button part outside of the text it only returns a blank screen. We were going crazy troubleshooting why it would only work randomly until we realized :laughing:
We are fixing this in our installation, but of course it would be a welcome improvement for any later versions of the plugin.

All the best,
Magnus

Great to hear about the Crossref plugin for OMP. We have OMP 3.3.0.13 and PHP 7.4 When the plugin is installed the Plugin page keeps loading, so it is not possible to enable the plugin. I get the following PHP error:

GET /index/$$$call$$$/grid/admin/plugins/admin-plugin-grid/fetch-grid?_=1681897499341 HTTP/1.0 https://test.books.open.tudelft.nl/index/admin/settings Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 621 Apache SSL/TLS access

2023-04-19 11:45:01 Warning 131.180.48.159

AH01071: Got error ‘PHP message: PHP Warning: require_once(/data/www/vhosts/books.open.tudelft.nl/test.books.open.tudelft.nl/plugins/importexport/crossref/CrossrefExportDeployment.inc.php): failed to open stream: No such file or directory in /data/www/vhosts/books.open.tudelft.nl/test.books.open.tudelft.nl/lib/pkp/includes/functions.inc.php on line 25PHP message: PHP Fatal error: require_once(): Failed opening required ‘/data/www/vhosts/books.open.tudelft.nl/test.books.open.tudelft.nl/plugins/importexport/crossref/CrossrefExportDeployment.inc.php’ (include_path=’.:/opt/plesk/php/7.4/share/pear’) in /data/www/vhosts/books.open.tudelft.nl/test.books.open.tudelft.nl/lib/pkp/includes/functions.inc.php on line 25’, referer: https://test.books.open.tudelft.nl/index/admin/settings

Does somebody know what is wrong and what to do?

Hello. It’s been a year since I asked about the crossref plugin for 3.4, so I thought maybe something changed and it is worth to ask again. whether there are plans to create it?

1 Like

Yes, I am waiting this plugin too. I always send xml to Crossref for registration. So, any news about this plugin for OMP 3.4?

1 Like

Hi @ajnyga, we are implementing your plugin in our OMP 3.3.
Moving the plugin to production environment, we noticed that it accesses only the Crossref test API due to a comment on row 8 of CrossrefExportPlugin.inc.php (we think the comment should be on row 9).
Can you correct the comment and have a look to our issue? We weren’t able to send the issue to your fork, probably it would be better if this plugin wouldn’t be a fork anymore…
Thanks and best regards
Stefano

Are there any news about OMP 3.4 Crossref Plugin?

1 Like

Hello @ajnyga!
Just wanted to report that adding abstracts to chapters meant that there was some errors when validating the xml. I got this for each chapter in my xml:

[Error] :58:17: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘titles’. One of ‘{“http://www.ncbi.nlm.nih.gov/JATS1”:abstract, “http://www.crossref.org/schema/4.4.2”:component_number, “http://www.crossref.org/schema/4.4.2”:publication_date, “http://www.crossref.org/schema/4.4.2”:acceptance_date, “http://www.crossref.org/schema/4.4.2”:pages, “http://www.crossref.org/schema/4.4.2”:publisher_item, “http://www.crossref.org/schema/4.4.2”:crossmark, “http://www.crossref.org/fundref.xsd”:program, “http://www.crossref.org/AccessIndicators.xsd”:program, “http://www.crossref.org/clinicaltrials.xsd”:program, “http://www.crossref.org/relations.xsd”:program, “http://www.crossref.org/schema/4.4.2”:archive_locations, “http://www.crossref.org/schema/4.4.2”:scn_policies, “http://www.crossref.org/schema/4.4.2”:doi_data}’ is expected.

Not sure if some local error or if the plugin needs some tweaking. Will deposit without abstracts in the meantime.
Best regards,
Magnus