pkp/ots

Retrieve DOI ID for references delivered by Crossref

fabiobatalha opened this issue · 7 comments

Would be nice to have the DOI number of all the references delivered by Crossref.

<element-citation>
    ...
    <pub-id pub-id-type="doi">10.17226/10732</pub-id>
    ...
</element-citation>

This should be pretty easy -- it should already be present in the BibTeX we get back from CrossRef in https://github.com/pkp/ots/blob/master/module/ReferencesConversion/src/ReferencesConversion/Model/Converter/References.php, so it's either getting dropped by bib2xml (which might be a pain to fix upstream) or by this XSLT: https://github.com/pkp/ots/blob/master/module/BibtexreferencesConversion/assets/biblatex2xml.xsl

Want to try running some BibTeX from CrossRef through bib2xml to see if it's one or the other?

OK, looks like an example looks like this (pardon the stupid example, I searched for "cheesecake" and the first result looks like some droll new-atheist type). It does in fact have a DOI:

$ curl --header "Accept: application/x-bibtex" http://dx.doi.org/10.1037/05168212 -L
@article{Robbins_2005,
        doi = {10.1037/05168212},
        url = {https://doi.org/10.1037%2F05168212},
        year = 2005,
        publisher = {Portico},
        volume = {50},
        number = {40},
        author = {Brent Dean Robbins},
        title = {Religion is cheesecake?},
        journal = {{PsycCRITIQUES}}
}

aaaaaand it looks like the bib2xml output from that string contains this...

<identifier type="doi">10.1037/05168212</identifier>

c9f902a should do it.

I'm trying to test, but the deposits are failing.

Job Status Creation Date Upload File name Actions
3202 Failed 2018/03/21 06:59:18 d2cce4c7-52a5-409d-ae96-805df2ddbeb3  
3200 Failed 2018/03/21 06:52:55 d2cce4c7-52a5-409d-ae96-805df2ddbeb3

Sorry about that, forgot I needed to use a simpler XSLT style for this environment

Should be fixed in 7900ecc, will test later today

It is working, great improvement!!