Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display DOIs according to the CrossRef guidelines #421

Closed
zuphilip opened this issue Oct 5, 2016 · 15 comments · Fixed by #422
Closed

Display DOIs according to the CrossRef guidelines #421

zuphilip opened this issue Oct 5, 2016 · 15 comments · Fixed by #422

Comments

@zuphilip
Copy link

@zuphilip zuphilip commented Oct 5, 2016

Crossref has just announce to change the guidelines to display dois: http://blog.crossref.org/2016/09/new-crossref-doi-display-guidelines.html . This includes the following suggestions

  1. Show the doi as an url and with any prefix DOI: or pseudo-protocol doi:. Actually this is already part of the 2011 guidelines and there the background is also explained: "Previously, Crossref recommended that DOIs be displayed in the format doi:10.NNNN/doisuffix At the time that the DOI system was first envisioned, it was thought that doi: would become native to browsers and automatically resolve DOIs. It appears unlikely that that will happen."
  2. Drop the dx in the url. I guess this is already achieved with the commit dcbaa0f by @jesusbagpuss
  3. Prefer https over http as @afandian also explained in the csl-styles discussion.

Thus, the best practice according to the CrossRef, which is a common view with DataCite, is

So–it’s simple–always make the DOI a full link – https://doi.org/10.1006/jmbi.1995.0238 – even when it’s on the abstract or full text page of the content that the DOI identifies – and use “https://doi.org/”.

@afandian
Copy link

@afandian afandian commented Oct 5, 2016

Thanks for getting this started!

@icklecows
Copy link
Contributor

@icklecows icklecows commented Oct 5, 2016

I think this is something that should be done, although it's notable that EPrints uses the id_number field rather than a dedicated DOI field to record these. The script that renders the DOI is:

https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Extras.pm#L301

This is already just using doi.org, so it's only updating to https that's required I think.

@afandian
Copy link

@afandian afandian commented Oct 5, 2016

Yes, looking at that code (which looks good FWIW), it should be a single character fix!

@icklecows
Copy link
Contributor

@icklecows icklecows commented Oct 5, 2016

Not quite - the regexp that picks up whether or not it is a DOI also needs to recognise DOIs input using the current guidelines. But it's nothing more than that.

@afandian
Copy link

@afandian afandian commented Oct 5, 2016

Yes, I missed that.

@zuphilip
Copy link
Author

@zuphilip zuphilip commented Oct 5, 2016

Moreover, we should render the doi as a link (see point 1). I guess with something like

    my $url = "http://doi.org/$value";
    my $link = $session->render_link( $url, "_blank" ); 
-   $link->appendChild( $session->make_text( $value ) );
+   $link->appendChild( $session->make_text( $url) );

@icklecows
Copy link
Contributor

@icklecows icklecows commented Oct 5, 2016

Yes, good point.

@icklecows
Copy link
Contributor

@icklecows icklecows commented Oct 5, 2016

Do you want to do the pull request @zuphilip or shall I?

@zuphilip
Copy link
Author

@zuphilip zuphilip commented Oct 5, 2016

It would be great, when you can do these changes. (I am watching and learning then:-)

@mpbraendle
Copy link
Contributor

@mpbraendle mpbraendle commented Oct 7, 2016

Should not all plugins that handle DOI be adapted accordingly, e.g. the perl_lib/EPrints/Plugin/Import/DOI.pm plugin ?

It is not only about rendering, but if the CrossRef guideline explained in http://blog.crossref.org/2016/09/new-crossref-doi-display-guidelines.html begins to take effect, people will paste the full DOI URL into the form (which is intended by the guideline).
Are there other plugins we should be aware of? E.g. DOI field entry in the manage deposits and review workflow?

@afandian
Copy link

@afandian afandian commented Oct 7, 2016

Agreed @mpbraendle, everywhere a DOI is expected a DOI should work, and DOIs are URLs (as per guidelines going back at least 5 years, that's the earliest archived version I could find).

(EDIT: Although annoyingly they can, and are, be expressed in different ways, like 10.5555/12345678, doi:10.5555/12345678, http://dx.doi.org/10.5555/12345678, https://doi.org/10.5555/12345678. Software accepting them should be liberal in input but strict in output, which should be https://doi.org/10.5555/12345678)

@icklecows
Copy link
Contributor

@icklecows icklecows commented Oct 7, 2016

OK, there are 15 files in eprints that match a search for "doi"

No changes needed:

  • perl_lib/EPrints/Extras.pm - has already been updated
  • lib/defaultcfg/cfg.d/plugins.pl
  • perl_lib/EPrints/Plugin/Screen/Import/DOI.pm
  • lib/defaultcfg/cfg.d/eprint_fields.pl
  • perl_lib/URI/OpenURL.pm
  • perl_lib/EPrints/Plugin/Export/RIS.pm
  • perl_lib/SOAP/ISIWoK.pm

Changes needed:

  • perl_lib/EPrints/Plugin/Import/DOI.pm - needs s adding to official url, but also does it need to do the same format check as the render script?
  • lib/lang/en/phrases/system.xml - Phrase for importing DOI recommends the old format doi: rather than current. Should be updated if the import script is made more flexible to accept URL formatted DOIs.
  • tools/pirus_pingbackd - needs s? added to regexp Done

Edit 17/11/16: The Import from DOI doesn't work for me - I think it requires CrossRef registration, and as a data repository, that's not something I'd ever use.

Changes would improve these:

  • perl_lib/EPrints/Plugin/Export/DC.pm - not currently doing anything to the DOI field - should perhaps have a render script to standardise them as per Extras.pm?
  • lib/cfg.d/rdf_triples_bibo.pl - probably needs updating as only seems to be checking for doi:
  • perl_lib/EPrints/Plugin/Import/ISIWoK.pm - no change needed, although maybe it should look for the DOI field rather than assuming ID number?
  • perl_lib/EPrints/Plugin/Import/ISIWoKXML.pm - no change needed, although maybe it should look for the DOI field rather than assuming ID number?

Unknown:

  • perl_lib/ParaTools/CiteParser/Standard.pm - I have no idea what this is let alone what it's doing with DOIs, sorry

@denics
Copy link
Contributor

@denics denics commented Oct 8, 2016

should we create a function accepting the input listed by @afandian and rendering correctly https://doi.org/10.5555/12345678 perhaps extending URI:: so that using it would be as easy as

$mydoi = URI::doi->new("10.5555/12345678");
$mydoi = URI::doi->new("doi:10.5555/12345678");

also, we should consider upgrading the version of URI.pm or simply remove it from our code and include as a dependency. I'm running all my repos with URI 1.71 since a while now without problems. see #416

@icklecows
Copy link
Contributor

@icklecows icklecows commented Nov 10, 2016

I think if there's uncertainty around whether we're keeping URI or using a dependency, it's probably best to fix the code as it is right now, and worry about DRYing it out later.

@phluid61
Copy link
Contributor

@phluid61 phluid61 commented Nov 11, 2016

It's worth pointing out that we consistently gloss the fact that URIs and DOIs have different character repertoires [link]. I'm +1 for patching the problems now, and designing a good DRY solution for the future.

phluid61 added a commit to QUTlib/eprints that referenced this issue Nov 11, 2016
Handles parsing and displaying of DOIs in a single authoritative way.

Inspired by eprints#421
phluid61 added a commit that referenced this issue Feb 16, 2018
* add EPrints::DOI library

Handles parsing and displaying of DOIs in a single authoritative way.

Inspired by #421

* change core to use EPrints::DOI where sensible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants