Closed gnott closed 4 years ago
Most recent commit also has a side-effect of including more tag attributes in abstract tags that were previously not included. It will also add appropriate XML namespaces to to the <jats:abstract>
tag for (hopefully) easier parsing if the XML snippet is used from the Crossref API (assuming Crossref keeps the namespace attributes after it is ingested).
Re issue https://github.com/elifesciences/issues/issues/5743
To support parsing and depositing of structured abstracts to Crossref -- abstracts which have
<sec>
tags in them -- this PR includes code to enhance these type of deposits.Versions of the
elifetools
andelifearticle
libraries used here make it possible to extract an article XML's abstract in XML format, and anArticle
object'sabstract_xml
property is set to this value.The existing logic for transforming a JATS abstract to a Crossref abstract is moved to a new code module. It is expanded to clean and convert any
<sec>
and<title>
tags.In the existing test cases based on article XML fixtures, there are two altered as a result of this:
00666
kitchen sink XML sample has fewer extra new line characters in the Crossref deposit due to removing the excess was producing a cleaner Crossref deposit file for all existing test scenariosThere's not too much more to be done, since this is feature complete and the tests are passing. Merging and deploying can wait for a couple final questions posed to stakeholders.