elifesciences / elife-crossref-xml-generation

Crossref deposit of journal articles
MIT License
4 stars 3 forks source link

Crossmark assertion tags #94

Closed gnott closed 3 years ago

gnott commented 3 years ago

Re issue https://github.com/elifesciences/issues/issues/6620

We want to add <assertion> tags to the <custom_metadata> tag in the <crossmark> tag, if the article's display_channel value matches particular values.

To do this, when parsing the XML, also parse the categories data, which will include the display channel, if it is present in the XML. Then, check it against the list of values specified in the .cfg file, the parameter named assertion_display_channel_types holds a list of values the display channel needs to be found in (with case-insensitive matching). As always, the configuration also need to have crossmark: true set so the <crossmark> tag is there too.

I anticipate this will not affect any non-eLife articles drastically, unless other journals also have crossmark enabled, and have a display channel, and the display channel value matches.

I assigned a new version number 0.2.0 for this, representing a code enhancement that is (or should be) backwards compatible.