adsabs / export_service

Export service to output ADS records with various formats including BibTex, AASTex, and multiple tagged and xml options
MIT License
3 stars 5 forks source link

Add <pub-date> element to JATSXML export format #254

Open ehenneken opened 1 month ago

ehenneken commented 1 month ago

Please add the element <pub-date> to the JATSXML export format. This can be populated from the pubdate field from Solr. The <pub-date> element has to appear before the <volume> element. It should have the format

<pub-date><month>11</month><year>1950</year></pub-date>

(for example for 1950ApJ...112..559W). So, for e.g. 1950ApJ...112..559W the JATSXML export should look like

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN" "https://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher">ApJ</journal-id>
<issn>0004-637X</issn>
<publisher>
<publisher-name>IOP</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="archive">1950ApJ...112..559W</article-id>
<article-id pub-id-type="doi">10.1086/145370</article-id>
<title-group>
<article-title>Radial Velocities of Six Stars Having Composite Spectra.</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name>
<surname>White, William C., Jr.</surname>
</name>
</contrib>
</contrib-group>
<pub-date><month>11</month><year>1950</year></pub-date>
<volume>112</volume>
<fpage>559</fpage>
<lpage>560</lpage>
<permissions />
<abstract />
</article-meta>
</front>
</article>
golnazads commented 1 month ago

@ehenneken sorry, the date is there, but somehow it produced error and was not displayed. It is fixed now, and shall be in the next release.

< ?xml version=\"1.0\" encoding=\"UTF-8\" ? > < !DOCTYPE article PUBLIC \"-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN\" \"https://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd\" > < article xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:mml=\"http://www.w3.org/1998/Math/MathML\" article-type=\"research-article\" > < front > < journal-meta > < journal-id journal-id-type=\"publisher\" >ApJ< /journal-id > < issn >0004-637X< /issn > < publisher > < publisher-name >IOP< /publisher-name > < /publisher > < /journal-meta > < article-meta > < article-id pub-id-type=\"archive\" >1950ApJ...112..559W< /article-id > < article-id pub-id-type=\"doi\" >10.1086/145370< /article-id > < title-group > < article-title >Radial Velocities of Six Stars Having Composite Spectra.< /article-title > < /title-group > < contrib-group > < contrib contrib-type=\"author\" > < name > < surname >White, William C., Jr.< /surname > < /name > < /contrib > < /contrib-group > < pub_date publication-format=\"print\" date-type=\"pub\" iso-8601-date=\"1950-11-00\" > < day >00< /day > < month >11< /month > < year >1950< /year > < /pub_date > < volume >112< /volume > < fpage >559< /fpage > < lpage >560< /lpage > < permissions / > < abstract / > < /article-meta > < /front > < /article >

ehenneken commented 3 weeks ago

@golnazads please let me know when this change is in production. Thank you!

ehenneken commented 5 days ago

@golnazads I only just noticed this: the XML tag should be pub-date (with a hyphen) rather than the current underscore. Could you please correct this?